Browse Source

Cleaner code.

Mr.doob 12 years ago
parent
commit
015b3c957a
1 changed files with 3 additions and 2 deletions
  1. 3 2
      examples/index.html

+ 3 - 2
examples/index.html

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