07 - JS Query

Chris said that adding a Js Query would benefit us not only with our marks, but also with our development within the module. I decided it would be a great idea to add the ability to use the thumbnails (that are located at the bottom of the content section of the page) to enable the user to see pictures of my interests, since the site is meant to be about me!

I used an on-line resource called Lightbox, which is:


"a simple, unobtrusive script used to overlay images on the current page. It's a snap to setup and works on all modern browsers." (quote by the Lightbox 2 team)
The Lightbox 2 enlarges an external image of your choice when clicked by the user, and fades the background around the image to a light grey overtone. It looks professional, and similar queries are used across the whole web, including top businesses, I have included a screen shot below, which showcases the effect the Lightbox brings to my website.



To get this working within my site I had to add some extra JavaScript files, and relate my links (using rel="lightbox" within the tags).

I had problems with the sizing of the images, and had to resize a few so there was a smooth transition between images (the picture of my guitar gear for example was way too big and had to be rescaled).

No comments:

Post a Comment