Jquery Lightbox Image Display with Previous Next Functionality Slideshow

I remember 3-4 years back we used to display a Large Image/ Data in a popup window. JavaScript Popup window (window.open function). Recent Web 2.0 application has changed the way we view images data on the website. We are talking about a Lighbox. Lightbox is nothing but a Div layer with zindex above the window layer. It displays like a screen/window above the parent window.

Jquery Slideshow Script

Using CSS we modify the look and feel like transparency etc.. This makes the application more attractive, user friendly and user comitment towards your site/ webpages.

Jquery Lighbox Script Features/ Usage-

This is a simple Jquery script with CSS to modify look and feel.

The look and feel can be completely editable to your choice.

Use Images with image title/ descriptive text to be displayed below image.

Previous next functionality.

Smooth lighbox effect.

Image Loader.

Click here to view this in action

Click Here to View Demo

How to Use Jquery Lighbox script:

Part 1 – Setup

  1. Lightbox v2.0 uses the Prototype Framework and Scriptaculous Effects Library. You will need to include these three Javascript files in your header.
    <script type="text/javascript" src="js/prototype.js"></script>
    <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
    <script type="text/javascript" src="js/lightbox.js"></script>
  2. Include the Lightbox CSS file (or append your active stylesheet with the Lightbox styles).
    <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
  3. Check the CSS and make sure the referenced prevlabel.gif and nextlabel.gif files are in the right location. Also, make sure the loading.gif and closelabel.gif files as referenced near the top of the lightbox.js file are in the right location.

Part 2 – Activate

  1. Add a rel="lightbox" attribute to any link tag to activate the lightbox. For example:
    <a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>

    Optional: Use the title attribute if you want to show a caption.
  2. If you have a set of related images that you would like to group, follow step one but additionally include a group name between square brackets in the rel attribute. For example:
    <a href="images/image-1.jpg" rel="lightbox[roadtrip]">image #1</a>
    <a href="images/image-2.jpg" rel="lightbox[roadtrip]">image #2</a>
    <a href="images/image-3.jpg" rel="lightbox[roadtrip]">image #3</a>

    No limits to the number of image sets per page or how many images are allowed in each set. Go nuts!
Bookmark and Share
Both comments and pings are currently closed.

4 Responses to “Jquery Lightbox Image Display with Previous Next Functionality Slideshow”

  1. Hermine Casa says:

    This is such an important useful resource that you’re offering and also you give it away for free. I like seeing web sites that understand the worth of providing a high quality useful resource for free. Good job!

  2. Very fascinating post – may be outdated, but it surely was new to me. I needed to thank you for this good post UncleCode.Com – Technology Blog | Jquery Lightbox Image Display with Previous Next Functionality Slideshow ! I undoubtedly loved reading every bit of it. I have you bookmarked to check out new stuff you post.

  3. Great blog!! You should start many more. I love all the info provided. I will stay tuned :)

  4. Sarvjit says:

    Wow!! this is great. Thanks so much, i was searching this for too long.
    hipppppyyyy……

n