I 开发者_JAVA百科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?
I believe one of these are what you are looking for.
http://leandrovieira.com/projects/jquery/lightbox/
http://jquery.com/demo/thickbox/
They're called lightboxes, if you search google again, I'm sure you'll find a lot.
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.
精彩评论