Slimbox
Earlier I posted about this cool wordpress plugin. The light box plugin especially for wordpress. I just found another similar plugin for hmtl pages - (also for other web extensions I think). The Slimbox.
Example page: A cool portfolio for your website
Slimbox versus Lightbox:
Features:
From a functional point of view, Slimbox has the following added features compared to the original Lightbox:
* Slimbox is ready to launch as soon as the document is ready. This means that you don’t have to wait for all images of the page to be loaded before clicking on a link launching the Lightbox effect.
* The left and right arrow keys can be used to navigate through images, and the ESC key can be used to close Slimbox (Warning: in Mozilla browsers, the ESC key is also used to stop GIF images from animating).
* The dark background overlay can be clicked anywhere to close Slimbox, even on the parts located on the left and right of the image.
* The script is more robust; for example you can try to start-stop Slimbox very quickly to interrupt the animation then resume it and you won’t notice any bug like in the original Lightbox where sometimes the animation stops or the captions are wrongly sized.
* Slimbox temporary hides flash animations and other embedded videos while it is open to avoid display bugs in some browsers.
* Slimbox can be launched from the traditional image links inside the page like the original Lightbox, but also directly from a Javascript call using a special method.
Like they say it, my opinion the slimbox works exactly like the lightbox.
The differences from the lightbox:
* The code has been entirely rewritten with efficiency in mind for the mootools framework instead of the huge Prototype/Scriptaculous. The script itself is as tiny as 7kb (uncompressed).
* The Slimbox CSS are simpler and 100% valid (no more CSS hacks). Also, all images used by Slimbox are specified in the CSS instead of the Javascript so it is easier to style.
* Slimbox does not use the 1 pixel transparent gif image needed by Lightbox.
As you can read, its alot lighter then the lightbox - Can this be true? Slimbox is more lighter then THE LIGHT BOX? Why do they call it light box? Got it?
The tool required:
Slimbox 1.4 requires the mootools framework, version 1.1 or more recent. Because mootools is modular, you can make your download smaller by only downloading the modules your scripts are actually using. Here are the modules required by Slimbox:
* Class: all
* Native: all
* Element: Element.Event
* Window: Window.DomReady, Window.Size
* Effects: Fx.Style, Fx.Styles (optionally Fx.Transitions)
1 - place this in the header tag:
2 - inlude the script in the header tag aswell:
3 - Customize your stylesheet with the slimbox.css:
4 - activate the plugin:
Example:
<a title=”my caption” rel=”lightbox” href=”image-1.jpg”>image #1</a>
Mutiple:
<a rel=”lightbox[atomium]” href=”image-1.jpg”>image #1</a>
<a rel=”lightbox[atomium]” href=”mage-2.jpg”>image #2</a>
<a rel=”lightbox[atomium]” href=”image-3.jpg”>image #3</a>
Display 1 image:
Alternatively, you can also launch the Lightbox effect using Javascript to display a single image. Just call the following method, passing the URL of the image as first parameter and optionally a title as second parameter:
Lightbox.show(’images/image-1.jpg’, ‘Spheres in construction’);
