2
0
Mr.doob 9 жил өмнө
parent
commit
4207549fd3
1 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  1. 3 3
      examples/index.html

+ 3 - 3
examples/index.html

@@ -555,14 +555,14 @@
 					link.className = 'link';
 					link.textContent = name;
 					link.href = "#" + file;
+					link.addEventListener( 'click', function ( event ) {
 
-					link.addEventListener( 'click', function (ev) {
+						if ( event.button === 0 ) {
 
-						if (ev.button === 0) {
+							event.preventDefault();
 
 							panel.classList.toggle( 'collapsed' );
 							load( file );
-							ev.preventDefault()
 
 						}