Explorar o código

Cleaner code.

Mr.doob %!s(int64=12) %!d(string=hai) anos
pai
achega
015b3c957a
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      examples/index.html

+ 3 - 2
examples/index.html

@@ -396,8 +396,7 @@
 
 			if ( selected !== null ) divs[ selected ].className = 'link';
 
-			selected = file;
-			divs[ selected ].className = 'link selected';
+			divs[ file ].className = 'link selected';
 
 			window.location.hash = file;
 			viewer.src = file + '.html';
@@ -405,6 +404,8 @@
 
 			button.style.display = '';
 
+			selected = file;
+
 		};
 
 		if ( window.location.hash !== '' ) {