summaryrefslogtreecommitdiff
path: root/docs/api.rst
blob: a57f144e1bcff6e0de1aff4b90ffb3512002375c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Core API
========

A `LightBox.Core` object have the following public API that can be considered stable. I you are creating a plugin you might want to check :doc:`hacking`.


**quitLightbox()**
Exit and remove the lightbox


**switchToIndex(** index **)**
Switch to image *index* in targets array

index
    **int**


**addOnStartListener(** listener **)**
Add a OnStartListener

listener
    **function**


**addOnEndListener(** listener **)**
Add a OnEndListener

listener
    **function**


**addOnLoadStartListener(** listener **)**
Add a OnLoadStartListener

listener
    **function**


**addOnLoadEndListener(** listener **)**
Add a OnLoadEndListener

listener
    **function**


**registerPlugin(** plugin **)**
Register a plugin

plugin
    **Object**