소스 검색

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

Hakim El Hattab 11 년 전
부모
커밋
1c16148c09
2개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  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

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
js/reveal.min.js


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.