diff options
author | Gourav Tiwari <gouravtiwari21@gmail.com> | 2013-02-11 13:51:40 -0500 |
---|---|---|
committer | Gourav Tiwari <gouravtiwari21@gmail.com> | 2013-02-11 13:51:40 -0500 |
commit | 4df8a256254705b6c6ffa5cf2edb7c52d26b43ec (patch) | |
tree | f9f93071212d018056a4a6214cd7e5a393a48296 /js | |
parent | 7ee4e0ba66f032dba38261d0ed849bc88ce36baf (diff) | |
download | fosdem-2018-presentation-4df8a256254705b6c6ffa5cf2edb7c52d26b43ec.tar fosdem-2018-presentation-4df8a256254705b6c6ffa5cf2edb7c52d26b43ec.tar.gz |
Added isFirstSlide and isLastSlide functions
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js index fc5164d..0c39f8e 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1529,7 +1529,25 @@ var Reveal = (function(){ } + /** + * + * @return {Boolean} true if current slide is first slide, + * false otherwise + */ + + function firstSlide(){ + return (document.querySelector(SLIDES_SELECTOR + '.past') == null ? true : false); + } + + /** + * + * @return {Boolean} true if current slide is last slide, + * false otherwise + */ + function lastSlide(){ + return (document.querySelector(SLIDES_SELECTOR + '.future') == null ? true : false); + } // --------------------------------------------------------------------// // ----------------------------- EVENTS -------------------------------// // --------------------------------------------------------------------// @@ -1880,6 +1898,14 @@ var Reveal = (function(){ return scale; }, + isFirstSlide: function(){ + return firstSlide(); + }, + + isLastSlide: function(){ + return lastSlide(); + }, + // Helper method, retrieves query string as a key/value hash getQueryHash: function() { var query = {}; |