NodeFire Library

lightBox  1.0.6

NodeFire Library > lightBox > NF.lightBoxManager
Search:
 
Filters

static Class NF.lightBoxManager

Provides access and manages multiple lightBox objects. The manager is also responsible for generating new NF.lightBox objects and gallery frames based on anchor tags containing 'rel' attributes with lightbox properties specified.

Properties

lightBoxes - Object

Object containing all lightBox objects in the current document. Each property of the object is a gallery id name with an NF.lightBox object as the value.

Methods

getLightBox

lightBox getLightBox ( ID )
Get the NF.lightBox object with the corresponding id or gallery name.
Parameters:
ID <string> The id or gallery name of the lightbox to return.
Returns: lightBox
NF.lightBox object.

getPreLoads

array getPreLoads ( )
Get all preloaded image URL's. This method returns the lightbox 'src' URL property for all successfully preloaded frame images.
Returns: array
String array of the currently preloaded image URL's.

preLoad

image preLoad ( src )
Preloads an image and returns a new image object.
Parameters:
src <string> The location and file name of the image resource to preload.
Returns: image
Image Object

Events

boxesReady

boxesReady ( event )
Fires on document.ready after the NF.lightBox objects based on 'rel' attributes in the HTML are created.
Parameters:
event <object> Object literal containing the following properties...
  • {type:string} The type of event.
  • {target:Object} The object which triggered the event.

frameImagePreLoaded

frameImagePreLoaded ( event )
Fires when a frame image is preloaded.
Parameters:
event <object> Object literal containing the following properties...
  • {type:string} The type of event.
  • {target:Object} The object which triggered the event.
  • {lightBox:Object} The NF.lightBox object which owns the frame.
  • {frame:Object} The frame object which defines the image.
  • {img:Node} The HTML Node which holds the preloaded image.

frameReady

frameReady ( event )
Fires when a new frame is added and ready. This applies to frames created using a 'rel' attribute attached to an anchor tag within the DOM. Occurs before the 'boxesReady' event fires.
Parameters:
event <object> Object literal containing the following properties...
  • {type:string} The type of event.
  • {target:Object} The object which triggered the event.
  • {anchor:node} The anchor element node (A tag) which contains the 'rel' attribute for the new frame.
  • {parentContainer:node} The parent container if the frame belongs to an inline lightbox.
  • {lightBox:NF.lightBox} The NF.lightBox object which owns the new frame.
  • {frame:object} The new frames paramter object.
  • {frameId:string} The new frames gallery id.


Copyright © 2012 OpenCube: Inc. All rights reserved.