Home » Snippets » Browse Snippet

Browse Snippet

JavaScript slimbox2 ver. 2.05
License
GNU General Public License (GPL)
Programming Language
PHP
Topic
Gallery
 

Description:

Homepage of original slimbox2:

http://www.digitalia.be/software/slimbox2


Introduction

Slimbox 2 is a 4 KB visual clone of the popular Lightbox 2 script by Lokesh Dhakar, written using the jQuery javascript library. It was designed to be very small, efficient, standards-friendly, fully customizable, more convenient and 100% compatible with the original Lightbox 2.


Features

From a functional point of view, Slimbox 2 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 that will launch the Lightbox effect.
* Slimbox also centers images vertically on startup, not just horizontally. Vertical scrolling is still possible.
* It works perfectly on horizontal-scrolling websites.
* It temporary hides flash animations and other embedded videos while it is open to avoid display bugs in some browsers. It also hides select boxes in Internet Explorer 6.
* Using a special option (“loop”), it allows you to navigate between the first and last images.
* Slimbox is more responsive; it allows you to close it immediately at any time using the keyboard or mouse and to instantly navigate to any image before the current image has loaded or the animations are complete.
* The script is more robust; for example you can try to start and stop Slimbox or navigate between images very quickly to interrupt the animations and resume them and you won’t notice any bug like in the original Lightbox where sometimes the animation stops or the elements are wrongly sized or positioned.
* Slimbox can be launched from the traditional image links inside the page like the original Lightbox, but also directly from Javascript using its complete API.

From a design point of view, Slimbox 2 is very different from Lightbox:

* The code is optimized to an insane level and has been written from scratch with efficiency in mind for the jQuery library instead of the huge Prototype/Scriptaculous. The script itself is as tiny as 4kb (minified, uncompressed).
* Slimbox can be entirely customized thanks to many options. You can change the duration of any effect, the counter text translation or even the navigtation keys.
* Slimbox has a much more powerful API, allowing you to apply the Lightbox effect easily on any clickable element or from any script. For example, it can be easily integrated with links pointing to Flickr or Picasa Web Albums pages or with any javascript image gallery.
* The Slimbox CSS are simpler and 100% valid (no more CSS hacks). Also, every visual aspect of Slimbox (including images) is specified in the CSS instead of the Javascript so it is easier to style. You may even change any border size in the CSS and Slimbox will still work fine, which means that nothing is “hard-coded” in the source code.

<cut>



More specific info about slimbox2 available at Christophe Beyls' homepage.


New added features to version 2.05 by Karol Domagała from mslonik.pl team...

* In any previous version of the script there were used special small pictures to visualize functions 'next', 'previous' and 'close'. From now one can use any text string against pictures. It was made with use of new added arguments: nextImageLbText, prevImageLbText, closeLbText, counterText
* The default CSS was slightly changed, so above text strings are semi transparent.

You can download 2.05 slimbox2 source code from here.



One of the most importan developments made with use of the slimbox2 ver. 2.05 is YASIG joomla gallery plugin, but that's another story...

Files in this snippet:

No files for this snippet
Submitted by Maciej Słojewski on 2010-09-27 12:18:43

©2005-2018 Open Source Matters, Inc. All rights reserved. Joomla Hosting by Rochen Ltd.    Accessibility Statement    Privacy Policy    Gforge