Guest User

Untitled

a guest
Jan 20th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  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. }
Add Comment
Please, Sign In to add comment