XtGem Forum catalog

Lightbox JS v2.05

by Lokesh Dhakar

Example

How to Use:

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.
    
    
    
    
  2. Include the Lightbox CSS file (or append your active stylesheet with the Lightbox styles).
    
    
  3. Check the CSS and make sure the referencedprevlabel.gifandnextlabel.giffiles are in the right location. Also, make sure theloading.gifandcloselabel.giffiles as referenced near the top of thelightbox.jsfile are in the right location.

Part 2 - Activate

  1. Add arel="lightbox"attribute to any link tag to activate the lightbox. For example:
     Photo
    
    Optional:Use thetitleattribute 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:
     Photo
     Photo
     Photo
    
    No limits to the number of image sets per page or how many images are allowed in each set. Go nuts!