From 60d6c5f3e46b887806e252d5dea1f04715a81e0d Mon Sep 17 00:00:00 2001 From: Victor Häggqvist Date: Sat, 16 Jan 2016 22:00:36 +0100 Subject: write some docs and fixup demo --- docs/api.rst | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 docs/api.rst (limited to 'docs/api.rst') diff --git a/docs/api.rst b/docs/api.rst new file mode 100644 index 0000000..a57f144 --- /dev/null +++ b/docs/api.rst @@ -0,0 +1,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** -- cgit v1.2.3