Gives Starlets the ability to open lightboxes.
- Source:
Methods
-
<static> close(starletName)
-
Closes the lightbox called starletName.
Parameters:
Name Type Description starletNameString Framework name of Starlet in lightbox.
-
<static> closeSelf()
-
Call from within a lightbox to close itself, regardless of Starlet name.
-
<static> open(starletName, url, width, height)
-
Opens a lightbox called starletName using the criteria provided. The lightbox will appear and remain centered in the main application window. You are responsible for resizing the lightbox if desired.
Parameters:
Name Type Description starletNameString Desired Framework name of new Starlet.
urlString Location to load in lightbox.
widthNumber Desired width of lightbox (px).
heightNumber Desired height of lightbox (px).
-
<static> setClosedCallback(objectName, callbackName)
-
Sets a callback to alert you when a lightbox has closed.
Parameters:
Name Type Argument Default Description objectNameString <optional>
'window' Namespace containing method.
callbackNameString Name of method.
- Source:
- See:
Fires:
Example
OrionLightbox.setClosedCallback('', 'closedCallback'); function closedCallback(event) { if (event.eventName == 'lightboxClosed') { var lightboxName = event.name; // ... } }