开发者

Image Enlarger Script

开发者 https://www.devze.com 2023-03-13 19:19 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消