set 'hidden' attribute on all slides except the present (#457)

This commit is contained in:
Hakim El Hattab 2013-06-09 17:15:40 +02:00
parent 8393efe8e9
commit 1c16148c09
2 changed files with 6 additions and 2 deletions

View File

@ -1362,6 +1362,9 @@ var Reveal = (function(){
element.classList.remove( 'present' ); element.classList.remove( 'present' );
element.classList.remove( 'future' ); element.classList.remove( 'future' );
// http://www.w3.org/html/wg/drafts/html/master/editing.html#the-hidden-attribute
element.setAttribute( 'hidden', '' );
if( i < index ) { if( i < index ) {
// Any element previous to index is given the 'past' class // Any element previous to index is given the 'past' class
element.classList.add( reverse ? 'future' : 'past' ); element.classList.add( reverse ? 'future' : 'past' );
@ -1379,6 +1382,7 @@ var Reveal = (function(){
// Mark the current slide as present // Mark the current slide as present
slides[index].classList.add( 'present' ); slides[index].classList.add( 'present' );
slides[index].removeAttribute( 'hidden' );
// If this slide has a state associated with it, add it // If this slide has a state associated with it, add it
// onto the current state of the deck // onto the current state of the deck

4
js/reveal.min.js vendored

File diff suppressed because one or more lines are too long