Lytebox logo
Latest Version: Lytebox v3.22
Release Date: October 2, 2007  (Release History)


Overview

Lytebox was written from the Lightbox class that Lokesh Dhakar (http://www.huddletogether.com) originally wrote. The purpose was to write a self-contained object that eliminated the dependency of prototype.js, effects.js, and scriptaculous.js. Since the original version of Lytebox (which released with iFrame support), major modifications have been made to improve performance as well as "Slideshow" support, "Themes" support, HTML content support (as opposed to just images) and many more configurable options that allow you to customize the look and feel of Lytebox.

For examples of the new and improved Lytebox in action, select an image from one of the following display types:

Single Image
Andromeda
Grouped Images
Orion Nebula #1 Orion Nebula #2 Orion Nebula #3
Slideshow (Lyteshow feature)
Jupiter with one of its moons, Io The Milky Way The Pleiades

HTML Content (Lyteframe feature)
  1. M31 - Andromeda Galaxy
  2. M42 - Orion Nebula
 

How To Use

Step 1: Download Lytebox v3.22

Step 2:  Add the following lines to the <head> of your document:

<script type="text/javascript" language="javascript" src="lytebox.js"></script>
<link rel="stylesheet" href="lytebox.css" type="text/css" media="screen" />

Step 3:  Add the appropriate rel attribute for the type of display you want. See the examples below.

    Single Image Example:

<a href="images/image-1.jpg" rel="lytebox" title="Image Description">Image #1</a>

    Grouped Images Example:

<a href="images/image-1.jpg" rel="lytebox[vacation]" title="Mom and Dad">Mom and Dad</a>
<a href="images/image-2.jpg" rel="lytebox[vacation]" title="My Sister">My Sister</a>

    Slideshow Example (note the use of lyteshow instead of lytebox):

<a href="images/image-1.jpg" rel="lyteshow[vacation]" title="Mom and Dad">Mom and Dad</a>
<a href="images/image-2.jpg" rel="lyteshow[vacation]" title="My Sister">My Sister</a>

    HTML Content Example (note the use of lyteframe instead of lytebox):

<a href="http://www.google.com" rel="lyteframe" title="Search Google" 
   rev="width: 400px; height: 300px; scrolling: no;">Google Search</a>

<a href="catalog1.htm" rel="lyteframe[catalog]" title="Summer Catalog">Summer Catalog</a>
<a href="catalog1.htm" rel="lyteframe[catalog]" title="Winter Catalog">Winter Catalog</a>

Note: When using the "Lyteframe" feature, the REV attribute is used to control the width, height, and scrolling of the window. If the REV attribute is omitted, then by default width/height is set to 400px and scrolling is set to auto.


Browser Compatibility

While browser compatibility was in mind from the start, not all browsers were available for testing. These browsers include Safari, Netscape, and Linux-only browsers such as Konquerer. The major browsers that were tested cover approximately 98% of browsers in use, so it's fairly safe to say that no major problems will arise.

There is a "special" issue that is related to IE only. Sometimes the right side of the page will have a small area that is not overlayed. This is due to the way IE measures it's margins. Adding the following style to the page will fix this issue (but it will also affect the appearance of the entire page): body { margin: 0 auto; }

The following browsers have been tested with this script:


License

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.

Copyright © 2003-2009, Markus F. Hay. All rights reserved.