LC Lightbox - jQuery Plugin
Documentation
Public Methods
Introduction
Methods are global javascript functions, to be used to control LC Lightbox on custom events.
DEV NOTE: if an error is faced, the plugin will print debug trace into browser's console.
On certain methods you will need to use a valid lightbox instance.
Please refer to "Initialization" chapter to know more about instances.
lcl_open()
Opens directly the lightbox.
Parameters
(object) (required) | initialized lightbox instance |
---|---|
(int) (required) | element's index to open |
Example
<script type='text/javascript'> $(document).ready(function() { $obj = lc_lightbox('#lcl_elems_wrapper a'); lcl_open($obj, 0); // open lightbox showing first element }); </script>
lcl_resize()
Triggers lightbox resizing core, recalculating elements size and position
Parameters
none
Example
<script type='text/javascript'> $(document).ready(function() { // IMPORTANT: lightbox MUST BE already showing up lcl_resize(); }); </script>
lcl_close()
Simply closes lightbox
Parameters
none
Example
<script type='text/javascript'> $(document).ready(function() { // IMPORTANT: lightbox MUST BE already showing up lcl_close(); }); </script>
lcl_switch()
Switches from an element to another
Parameters
(string|int) (required) | Which element to show. Supports two fixed values and the dierect index submission:
|
---|
Example
<script type='text/javascript'> $(document).ready(function() { // IMPORTANT: lightbox MUST BE already showing up lcl_switch('next'); // shows the next element lcl_switch(3); // shows fourth element (indexes start from zero) }); </script>
lcl_start_slideshow()
Starts the slideshow
Parameters
(bool) (optional) | Use "true" to reset slideshow timing |
---|
Example
<script type='text/javascript'> $(document).ready(function() { // IMPORTANT: lightbox MUST BE already showing up lcl_start_slideshow(); }); </script>
lcl_stop_slideshow()
Stops the slideshow
Parameters
none
Example
<script type='text/javascript'> $(document).ready(function() { // IMPORTANT: lightbox MUST BE already showing up lcl_stop_slideshow(); }); </script>
lcl_destroy()
Destroys a lightbox instance.
Parameters
(object) (required) | initialized lightbox instance |
---|
Example
<script type='text/javascript'> $(document).ready(function() { $obj = lc_lightbox('#lcl_elems_wrapper a'); lcl_destroy($obj); }); </script>