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
|
Extends
- UWA.Controls.Overlay
Index
Methods
Methods
-
getInnerElement() → {HTMLelement}
-
Return DOM element to use when adding or updating content of the lightbox with
addContent
orsetContent
.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