From e570265a67461cfc110208cbe8562ad937794da8 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 26 Jul 2012 22:54:36 -0400 Subject: adds new api methods (getCurrentSlide, getPreviousSlide, getIndices) closes #73 --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 25a6c14..d2f36e7 100644 --- a/README.md +++ b/README.md @@ -65,9 +65,10 @@ Reveal.initialize({ ### API -The Reveal class provides a minimal JavaScript API for controlling its navigation: +The Reveal class provides a minimal JavaScript API for controlling navigation and reading state: ```javascript +// Navigation Reveal.navigateTo( indexh, indexv ); Reveal.navigateLeft(); Reveal.navigateRight(); @@ -76,6 +77,12 @@ Reveal.navigateDown(); Reveal.navigatePrev(); Reveal.navigateNext(); Reveal.toggleOverview(); + +// Retrieves the previous and current slide elements +Reveal.getPreviousSlide(); +Reveal.getCurrentSlide(); + +Reveal.getIndices(); // { h: 0, v: 0 } } ``` ### States @@ -172,7 +179,9 @@ You can change the appearance of the speaker notes by editing the file at `plugi ## History #### 1.5 (master/beta) -- TBD +- New API method ```Reveal.getPreviousSlide()``` +- New API method ```Reveal.getCurrentSlide()``` +- New API method ```Reveal.getIndices()``` #### 1.4 - Main ```#reveal container``` is now selected via a class instead of ID -- cgit v1.2.3