A low-level Lightbox plugin for jQuery.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
demo
README.textile
nitelite.js

README.textile

Nitelite

API Documentation

jQuery.nitelite

Calling jQuery.nitelite will give you a new Nitelite lightbox instance. Each instance has the following methods:

  • open
  • close
  • center
  • unload

open()

This method takes a single argument — the contents of the lightbox. It can be a string of HTML, a single DOM node, an array of DOM nodes, or a jQuery collection. E.g.

// String of HTML:
jQuery.nitelite().open('<div>content...</div>');

// Single DOM node:
jQuery.nitelite().open(document.createElement('div'));

// jQuery collection:
jQuery.nitelite().open(
    jQuery('<div/>', {
        css: {color:'red'}
    })
);

Note that if you pass a DOM node (or collection), that node will not be cloned — it will simply be appended to the lightbox.