aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Szopka <bartek.szopka+github@gmail.com>2012-02-15 21:10:56 +0100
committerBartek Szopka <bartek.szopka+github@gmail.com>2012-02-15 21:17:26 +0100
commitff81a1305411ac269b1a494e320b87c4d7d558d2 (patch)
tree2487f03b4c8c38d5fc1feaed4e5884326072a027
parentf248a39aabfe3aa42f676b0ae9cf4b0375a1c122 (diff)
downloadimpress.js-ff81a1305411ac269b1a494e320b87c4d7d558d2.tar.gz
some very basic documentation of the API
-rw-r--r--index.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/index.html b/index.html
index 0078fb8..6649992 100644
--- a/index.html
+++ b/index.html
@@ -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>