Archives

November 30, 2007

Image gallery

Filed under: Web development, javascript — bryan @ 8:30 pm

My brother Rory Gullan is pretty handy with a camera. To tie in with his first exhibition I built him a website to showcase some of his photographs.

Of course, I needed to give him a photo gallery. I first considered using Gallery2, which I implemented for Oscar Whicheloe’s site, but ended up building something a bit more individual. While this approach means more manual work for making changes (which wouldn’t have been appropriate for Oscar’s site), I minimised this in a few key ways:

  1. The image for the overlay is determined by checking the value of the image “src” attribute rather than needing to manually pass it through to the javascript.
  2. The alt text for each of the thumbnails is read by the javascript and used for the little description box.
  3. I used jQuery. The point is more that I used a javascript library than which one I used - but jQuery certainly worked well!