From 8550186afce516c4d4eb64103c540edd53a890d3 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 18 Nov 2013 09:13:34 -0500 Subject: use new fragment nav method from slide() --- js/reveal.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'js/reveal.js') diff --git a/js/reveal.js b/js/reveal.js index ed41ce5..dae1c8d 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1560,16 +1560,7 @@ var Reveal = (function(){ // Show fragment, if specified if( typeof f !== 'undefined' ) { - var fragments = sortFragments( currentSlide.querySelectorAll( '.fragment' ) ); - - toArray( fragments ).forEach( function( fragment, indexf ) { - if( indexf < f ) { - fragment.classList.add( 'visible' ); - } - else { - fragment.classList.remove( 'visible' ); - } - } ); + navigateFragment( f ); } // Dispatch an event if the slide changed @@ -2335,7 +2326,7 @@ var Reveal = (function(){ } if( offset > 0 && fragmentsShown.length ) { - console.log('hidden'); + console.log('shown'); dispatchEvent( 'fragmentshown', { fragment: fragmentsShown[0], fragments: fragmentsShown } ); } -- cgit v1.2.3