Prechádzať zdrojové kódy

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

Hakim El Hattab 11 rokov pred
rodič
commit
1c16148c09
2 zmenil súbory, kde vykonal 5 pridanie a 1 odobranie
  1. 4 0
      js/reveal.js
  2. 1 1
      js/reveal.min.js

+ 4 - 0
js/reveal.js

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

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
js/reveal.min.js


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov