author | ymh <ymh.work@gmail.com> |
Mon, 22 Mar 2010 16:36:28 +0100 | |
changeset 5 | ac511f1ccc8e |
parent 1 | 0d28b7c10758 |
permissions | -rw-r--r-- |
1 | 1 |
sfHover = function() { |
2 |
var sfEls = document.getElementById("sidebar").getElementsByTagName("LI"); |
|
3 |
for (var i=0; i<sfEls.length; i++) { |
|
4 |
sfEls[i].onmouseover=function() { |
|
5 |
this.className+=" sfhover"; |
|
6 |
} |
|
7 |
sfEls[i].onmouseout=function() { |
|
8 |
this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); |
|
9 |
} |
|
10 |
} |
|
11 |
} |
|
12 |
if (window.attachEvent) window.attachEvent("onload", sfHover); |