Skip to content Skip to sidebar Skip to footer

How To Load An Image From Thumbnail To Bigger Size With Javascript

I load a series of images in html (via asp.net) and resized via classic html width:50%. Then I would like that if I press on the thumb, this image appear on top of my html page ful

Solution 1:

There are many libraries like this, e.g. lightbox2

But if doing it yourself, you'll generally be messing with jQuery's css command, making the elements position: absolute, and setting up a mask element behind it, with partial opacity, to cover the rest of the content. Or if you want to be less obtrusive, which is better, setting and removing classes using jQuery's addClass and removeClass, and then defining the classes' style in CSS.

jQuery lightbox tutorial


Post a Comment for "How To Load An Image From Thumbnail To Bigger Size With Javascript"