SLBox 1.1.1

SLBox stands for simple lightbox. And that's what it is. There are tons of lightboxes out there for mootools, but I was missing one that supplies hooks (via events or options) for interacting with other classes. I was looking for a way to integrate ThumbsSlides with a lighbox navigation. This class was specificaly designed to interact with other classes.

Just so this will still be usable as a standalone (and also for testing), I also supplied the SLBGalery class, that takes a collection of a>img and supplies navigation controlles for it. This has been tested on FF 3.5 and IE6/8, so I'm assuming close-to-full cross browser support


Arieh Glazer
Current version
GitHub Issues



  • _self_/_current_:
    • core/1.3: [Class, Class.Extras, Element, Element.Event, Element.Style, Element.Dimensions, Selectors]
    • more/1.3: [Assets]

How to use

Simple -

lb = new SLBox('');

NOTE: all styles are on the CSS file, so obviously you're gonna need that

For SLBGalery:

var lb = new SLBGalery($$(#images a));

Options for galery will be passed to the lightbox. Events attached to it will be attached to the box. Note that the Gallery assumes the anchors' href will point to the target image for the lightbox. Also note that the Gallery provides all the API of SLBox.


  • lang: An object containing the text used for the buttons (look at source code to see what you can put there)
  • next : A function to fire when pressing the next button
  • prev : A function to fire when pressing the prev button
  • images : path to images folder
  • loader : name of loader image
  • close : name of close button image
  • useNav : should the class create the navigation buttons (default:true);


  • next : fires when the next button is clicked
  • prev : fires when the prev button is clicked
  • close : fires when the box closes
  • complete : fires when the loading


A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus