SHARE
TWEET

Untitled

a guest Jan 20th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var eles = document.querySelectorAll('li.level a'),
  2.     i;
  3.  
  4. for (i = 0; i < eles.length, i++) {
  5.   eles[i].onclick = function() {
  6.     //...
  7.   };
  8.  
  9. }
  10.    
  11. for (i = 0; i < eles.length, i++) {
  12.       eles[i].onclick = function() {
  13.         //...
  14.       };
  15. eles[i].onmouseover = function(this) {
  16.         this.style.cursor="crosshair";
  17.       };
  18.  
  19.     }
  20.    
  21. eles[i].onmouseover = function() {
  22.     this.style.cursor="crosshair";
  23. };
  24.    
  25. li.level a:hover {
  26.     cursor: crosshair;
  27. }
  28.    
  29. for (i = 0; i < eles.length, i++) // Wrong
  30. for (i = 0; i < eles.length; i++) // Right (semi-colon, not comma)
  31.    
  32. eles[i].onmouseover = function(/*this*/) {
  33.         this.style.cursor="crosshair";
  34.       };
  35.  
  36.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top