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 wid开发者_运维问答th:50%
. Then I would like that if I press on the thumb, this image appear on top of my html page full sized, like the classical gallery, but without the effect and a lot jquery code. How can I do this with Javascript?
What is the Javascript command to load an element in an other page position?
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
精彩评论