diff options
author | Bartek Szopka <bartek.szopka+github@gmail.com> | 2012-02-15 21:10:56 +0100 |
---|---|---|
committer | Bartek Szopka <bartek.szopka+github@gmail.com> | 2012-02-15 21:17:26 +0100 |
commit | ff81a1305411ac269b1a494e320b87c4d7d558d2 (patch) | |
tree | 2487f03b4c8c38d5fc1feaed4e5884326072a027 | |
parent | f248a39aabfe3aa42f676b0ae9cf4b0375a1c122 (diff) | |
download | impress.js-ff81a1305411ac269b1a494e320b87c4d7d558d2.tar.gz |
some very basic documentation of the API
-rw-r--r-- | index.html | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -293,6 +293,28 @@ <script src="js/impress.js"></script> <script>impress();</script> +<!-- + + The `impress()` function also gives you access to API to control the presentation. + + Just store the result of the call: + + var api = impress(); + + and you will get three functions you can call: + + `api.next()` - moves to next step of the presentation, + `api.prev()` - moves to previous step of the presentation + `api.goto( stepElement ) - moves the presentation to given step element (the DOM element of the step). + + You can also simply call `impress()` again to get the API, so `impress().next()` is also allowed. + Don't worry, it wont initialize the presentation again. + + For some example uses of this API check the last part of the source of impress.js where the API + is used in event handlers. + +--> + </body> </html> |