Class: UWA.Controls.Lightbox

UWA/Controls/Lightbox. UWA.Controls.Lightbox

new UWA.Controls.Lightbox(options)

The Lightbox control is designed to create modal with custom content inside that fade when you close it.

Available Events
Event Description
onPreOpen Triggered when the container is about to be opened
onOpen Triggered when the container is fully visible
onPreClose Triggered when the container is about to be closed
onClose riggered when the container is fully hidden
Example
var myControl = new UWA.Controls.Lightbox();

myControl.inject(widget.body);
myControl.addContent('Oh hi!');
myControl.open();
Parameters
Name Type Description
options Object

Options hash or a option/value pair.

Properties
Name Type Argument Default Description
exclusive Boolean <optional>
true

Close the other overlays before opening itself

closeable Boolean <optional>
true

Close the overlay by clicking on it

className String <optional>
''

Customized classname

fxOptions Object <optional>
{}

Custom fx options for open / close

Extends

  • UWA.Controls.Overlay

Index

Methods

getInnerElement() → {HTMLelement}

Return DOM element to use when adding or updating content of the lightbox with addContent or setContent.

Returns
Type
HTMLelement

setContent(content) → {this}

Set lightbox content (removing any existing content).

Parameters
Name Type Description
content String | HTMLelement

New content

Returns
Type
this

addContent(content) → {this}

Add content to the lightbox.

Parameters
Name Type Description
content String | HTMLelement

New content

Returns
Type
this