Want to improve this questio开发者_开发问答n? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this questioni'm looking for a lightweight javascript for displaying images the way lightbox does. it should be small + simple, no jquery/mootools plugin, no animations.
i just should be able to display an image when clicking on its thumbnail.
thanks
You can use for example Lytebox. This script doesn't have any dependencies on external libraries and integrating it with your page is as easy as using Lightbox
If you're looking for something really light-weight, you might take a look at this script.
To convert all links whose URLs end in .jpg
, .png
or .gif
, add the following lines to the bottom of your page:
<script src="minibox.js" type="text/javascript"></script>
<script type="text/javascript">
minibox.borderSize = 5;
minibox.borderType = 'solid red';
minibox.img.title = 'click to close image window';
minibox();
</script>
There is no documentation, but the code is reasonably clear.
精彩评论