diff options
author | Hakim El Hattab | 2013-11-07 09:12:49 -0500 |
---|---|---|
committer | Hakim El Hattab | 2013-11-07 09:12:49 -0500 |
commit | 150cb814058101cb1e1937ba11e8254d55958fa0 (patch) | |
tree | d857adf43b1c7b5557161f752beedcfc53e8f0a9 /js/reveal.js | |
parent | a119c83f86ab5aed459757553e3aa27313f7c60a (diff) |
data-autoslide on vertical parent now applies to all child slides #685
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js index 858785d..a2ceb7b 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2327,12 +2327,17 @@ var Reveal = (function(){ if( currentSlide ) { + var parentAutoSlide = currentSlide.parentNode ? currentSlide.parentNode.getAttribute( 'data-autoslide' ) : null; + var slideAutoSlide = currentSlide.getAttribute( 'data-autoslide' ); + // If the current slide has a data-autoslide use that, // otherwise use the config.autoSlide value - var slideAutoSlide = currentSlide.getAttribute( 'data-autoslide' ); if( slideAutoSlide ) { autoSlide = parseInt( slideAutoSlide, 10 ); } + else if( parentAutoSlide ) { + autoSlide = parseInt( parentAutoSlide, 10 ); + } else { autoSlide = config.autoSlide; } |