Prechádzať zdrojové kódy

use getElementByID when looking up linked slides #1086

Hakim El Hattab 10 rokov pred
rodič
commit
817bb3bf43
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      js/reveal.js

+ 1 - 1
js/reveal.js

@@ -2880,7 +2880,7 @@
 			// Ensure the named link is a valid HTML ID attribute
 			if( /^[a-zA-Z][\w:.-]*$/.test( name ) ) {
 				// Find the slide with the specified ID
-				element = document.querySelector( '#' + name );
+				element = document.getElementById( name );
 			}
 
 			if( element ) {