'Image Enlarger Script

I am looking for one of those scripts that when you click a Thumbnail, it makes the picture englarge. I tried searching Google using a lot of terms, but cant find any.

Where do I get these?



Solution 1:[1]

They're called lightboxes, if you search google again, I'm sure you'll find a lot.

Solution 2:[2]

i would use some very simple javascript:

your img tag in html file:

<img src="lala.alal" id="getbigger" onClick="grow()" />

your javascript:

function grow() {
width = document.getElementById('getbigger').width;
height = document.getElementById('getbigger').height;
width = width*[INSERT GROWTH RATIO HERE];
height = height*[INSERT GROWTH RATIO HERE];
document.getElementById('getbigger').height = height;
document.getElementById('getbigger').width = width;
}

of course you could just use jQuery animate tools

a good demo of jQuery animate with changing height and width is at this w3schools page.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 diracdeltafunk