Navarr's Tech Side The Technical Side of my Life

11Dec/090

JavaScript & CSS3 Lightbox

Usage:

  • Call createLightbox(); to create the actual lightbox element (does not display anything).
  • Call fillLightbox(string content) to fill the lightbox with RAW HTMLor

    Call appendLightbox(element childElement) to append a DOM Node directly into the lightbox.

  • Call setLightboxSize(int width, int height, null, string unit) to set the width and height of the lightbox.  Unit will default to pixels “px” if not specified.
  • Call showLightbox() to actually display the lightbox to the user.
  • Call boolean lightboxVisible() to determine if the lightbox is still visible or not.
  • Call hideLightbox() to remove the lightbox from view.
  • Call cleanLightbox() to delete all content inside the lightbox container.