jQuery lightBox plugin
jQuery lightBox plugin is simple, elegant, unobtrusive, no need extra markup and is used to overlay images on the current page through the power and flexibility of jQuery´s selector.
lightBox is a plugin for jQuery. It was inspired in Lightbox JS by Lokesh Dhakar.
The better way to know what is jQuery lightBox plugin, click the Example tab above and see it in action.
Parte 1 - Setup
jQuery lightBox plugin uses the jQuery JavaScript library, only. So, include just these two javascript files in your header.
<script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.lightbox-0.4.js"></script>
Include the CSS file responsible to style the jQuery lightBox plugin.
<link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.4.css" media="screen" />
Part 2 - Activate
You don´t need to modify your HTML markup to use jQuery lightBox plugin. Just use the power and flexibility of jQuery´s selector and create a set of related images.
The only necessity is to have a HTML markup likes it:
<a href="image1.jpg"><img src="thumb_image1.jpg" width="72" height="72" alt="" /></a>
After it, select the links and call the jQuery lightBox plugin. See some examples:
<script type="text/javascript"> $(function() { // Use this example, or... $('a[@rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel // This, or... $('#gallery a').lightBox(); // Select all links in object with gallery ID // This, or... $('a.lightbox').lightBox(); // Select all links with lightbox class // This, or... $('a').lightBox(); // Select all links in the page // ... The possibility are many. Use your creative or choose one in the examples above }); </script>
You might also like
Tags
accordion accordion menu animation navigation animation navigation menu carousel checkbox inputs css3 css3 menu css3 navigation date picker dialog drag drop drop down menu drop down navigation menu elastic navigation form form validation gallery glide navigation horizontal navigation menu hover effect image gallery image hover image lightbox image scroller image slideshow multi-level navigation menus rating select dependent select list slide image slider menu stylish form table tabs text effect text scroller tooltips tree menu vertical navigation menu