Browse Source

ExampleViewer: Bugfix selection/filtering

Mugen87 9 năm trước cách đây
mục cha
commit
ce9e8a3f4a
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      examples/index.html

+ 2 - 2
examples/index.html

@@ -333,9 +333,9 @@
 
 		function selectFile( file ) {
 
-			if ( selected !== null ) links[ selected ].className = 'link';
+			if ( selected !== null ) links[ selected ].classList.remove( 'selected' );
 
-			links[ file ].className = 'link selected';
+			links[ file ].classList.add( 'selected' );
 
 			window.location.hash = file;
 			viewer.focus();