From bf864c7a0d52cccff02f81f479c0f4d6264fb093 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 14 Jul 2013 18:19:40 -0400 Subject: ensure all future fragments are invisible #473 --- js/reveal.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'js/reveal.js') diff --git a/js/reveal.js b/js/reveal.js index 02b8932..dbe9be6 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1507,6 +1507,13 @@ var Reveal = (function(){ else if( i > index ) { // Any element subsequent to index is given the 'future' class element.classList.add( reverse ? 'past' : 'future' ); + + var fragments = toArray( element.querySelectorAll( '.fragment.visible' ) ); + + // No fragments in future slides should be visible ahead of time + while( fragments.length ) { + fragments.pop().classList.remove( 'visible' ); + } } // If this element contains vertical slides -- cgit v1.2.3