user470760
user470760

Reputation:

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?

Upvotes: 1

Views: 1215

Answers (3)

user456814
user456814

Reputation:

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

Upvotes: 1

diracdeltafunk
diracdeltafunk

Reputation: 1194

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.

Upvotes: 0

Travis
Travis

Reputation: 66

I believe one of these are what you are looking for.

http://leandrovieira.com/projects/jquery/lightbox/

http://jquery.com/demo/thickbox/

Upvotes: 1

Related Questions