Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var eles = document.querySelectorAll('li.level a'),
- i;
- for (i = 0; i < eles.length, i++) {
- eles[i].onclick = function() {
- //...
- };
- }
- for (i = 0; i < eles.length, i++) {
- eles[i].onclick = function() {
- //...
- };
- eles[i].onmouseover = function(this) {
- this.style.cursor="crosshair";
- };
- }
- eles[i].onmouseover = function() {
- this.style.cursor="crosshair";
- };
- li.level a:hover {
- cursor: crosshair;
- }
- for (i = 0; i < eles.length, i++) // Wrong
- for (i = 0; i < eles.length; i++) // Right (semi-colon, not comma)
- eles[i].onmouseover = function(/*this*/) {
- this.style.cursor="crosshair";
- };
- }
Add Comment
Please, Sign In to add comment