aboutsummaryrefslogtreecommitdiffhomepage
path: root/js/reveal.js
diff options
context:
space:
mode:
authorHakim El Hattab2013-01-12 12:17:50 -0500
committerHakim El Hattab2013-01-12 12:18:00 -0500
commite46855096c4c467082737214d83e3552108c9b67 (patch)
treefa15f598663395f53d426d9834d3a0e92d04fa77 /js/reveal.js
parent905ec83d535f7096c16f60ce085963c7fc21328c (diff)
merge in reset of vertical slides when returning to first slide #291
Diffstat (limited to 'js/reveal.js')
-rw-r--r--js/reveal.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 324ed99..fd0d7f5 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -12,6 +12,7 @@ var Reveal = (function(){
var SLIDES_SELECTOR = '.reveal .slides section',
HORIZONTAL_SLIDES_SELECTOR = '.reveal .slides>section',
VERTICAL_SLIDES_SELECTOR = '.reveal .slides>section.present>section',
+ HOME_SLIDE_SELECTOR = '.reveal .slides>section:first-child',
// Configurations defaults, can be overridden at initialization time
config = {
@@ -880,17 +881,17 @@ var Reveal = (function(){
// Reset all slides upon navigate to home
// Issue: #285
- if ( document.querySelector(HOME_SLIDE_SELECTOR).classList.contains('present') ) {
+ if ( document.querySelector( HOME_SLIDE_SELECTOR ).classList.contains( 'present' ) ) {
// Launch async task
- setTimeout(function () {
- var slides = toArray( document.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR + '.stack')), i;
- for ( i in slides ) {
- if (slides[i]) {
+ setTimeout( function () {
+ var slides = toArray( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.stack') ), i;
+ for( i in slides ) {
+ if( slides[i] ) {
// Reset stack
- setPreviousVerticalIndex(slides[i], 0);
+ setPreviousVerticalIndex( slides[i], 0 );
}
}
- }, 0);
+ }, 0 );
}
}