new moogallery(container, items_opt, options)
Images gallery user interface.
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
container |
String | Element | the gallery container element or its id attribute | |||||||||||||||
items_opt |
Array | the array of objects containing the images properties. Each object has the following properties:
|
|||||||||||||||
options |
Object | The class options object
Properties
|
- Source:
- src/ui/moogallery.js, line 55
Example
var mt = new ajs.ui.moogallery('mycontainer', [
{
thumb: 'http://my/thumb/path',
img: 'http://my/img/path',
title: 'image title',
description: 'image description'
credits: 'image credits'
},
{
thumb: 'http://my/thumb/path2',
img: 'http://my/img/path2',
title: 'image title2',
description: 'image description2'
credits: 'image credits2'
}
]);
Methods
-
changeItem(index)
Changes the image displayed in the lightbox widget
-
Parameters:
Name Type Description index
Number the index of the image to show - Source:
- src/ui/moogallery.js, line 457
Returns:
void -
<protected> renderItem(item_opt)
Inserts an image in the table creating a new cell and changing row if necessary
-
Parameters:
Name Type Description item_opt
Object the image options object to show - Source:
- src/ui/moogallery.js, line 101
Returns:
void -
renderLightbox(item_opt)
Renders the lightbox widget
-
This methos is public since has to be called in a chain process, but it's not necessary to call it directly
Parameters:
Name Type Description item_opt
Object the image options object to show - Source:
- src/ui/moogallery.js, line 248
Returns:
void -
renderLightboxContainer(item_opt)
Renders the lightbox widget container (image, title, description, credits, navigation)
-
This methos is public since has to be called in a chain process, but it's not necessary to call it directly
Parameters:
Name Type Description item_opt
Object the image options object to show - Source:
- src/ui/moogallery.js, line 327
Returns:
void -
<protected> renderNavigation(item_opt)
Renders the navigation controllers to surf through images in the lightbox widget
-
Parameters:
Name Type Description item_opt
Object the image options object to show - Source:
- src/ui/moogallery.js, line 412
Returns:
the lightbox navigation controllers -
<protected> renderOverlay(chain_callback)
Renders the overlay and calls the function to execute after
-
Parameters:
Name Type Description chain_callback
Function the function to call when overlay opacity animation ends - Source:
- src/ui/moogallery.js, line 221
Returns:
void -
<protected> setLightbox(thumb, item_opt)
Sets the thumb click event to render the lightbox navigation
-
Parameters:
Name Type Description thumb
Element the thumb image element item_opt
Object the image options object to show - Source:
- src/ui/moogallery.js, line 206
Returns:
void -
<protected> setTip(thumb, item_opt)
Sets a tooltip tied to the thumb and displayed on mouseover
-
Parameters:
Name Type Description thumb
Element the thumb image element item_opt
Object the image options object to show - Source:
- src/ui/moogallery.js, line 176
Returns:
void