aboutsummaryrefslogtreecommitdiff
path: root/js/reveal.js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2013-02-03 15:55:22 -0500
committerHakim El Hattab <hakim.elhattab@gmail.com>2013-02-03 15:55:22 -0500
commit11fc906add845d8dd2b1d2ea1d902d8e12a65fb9 (patch)
treedf0cab46639f58b266152cc2ccdc7171d32094e6 /js/reveal.js
parent080fb3cd33e6448a1f0e75987b796dcd550b487d (diff)
downloadfreenode-live-2017-presentation-11fc906add845d8dd2b1d2ea1d902d8e12a65fb9.tar
freenode-live-2017-presentation-11fc906add845d8dd2b1d2ea1d902d8e12a65fb9.tar.gz
helper method for retrieving slide based on index (closes #293)
Diffstat (limited to 'js/reveal.js')
-rw-r--r--js/reveal.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js
index a9890ca..52d2c7b 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -1829,6 +1829,18 @@ var Reveal = (function(){
// Returns the indices of the current, or specified, slide
getIndices: getIndices,
+ // Returns the slide at the specified index, y is optional
+ getSlide: function( x, y ) {
+ var horizontalSlide = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR )[ x ];
+ var verticalSlides = horizontalSlide && horizontalSlide.querySelectorAll( 'section' );
+
+ if( typeof y !== 'undefined' ) {
+ return verticalSlides ? verticalSlides[ y ] : undefined;
+ }
+
+ return horizontalSlide;
+ },
+
// Returns the previous slide element, may be null
getPreviousSlide: function() {
return previousSlide;