Hi.
I'm curious about this syntax:
<variable>=func tion(){...}
I'm not finding a definition of this syntax, but I see it used at this
website:
Here's the usage (in a few different lines) I found there:
sfHover = function() {
var sfEls = document.getEle mentById("nav") .getElementsByT agName("LI");
for (var i=0; i<sfEls.length ; i++) {
sfEls[i].onmouseover=fu nction() {
this.className+ =" sfhover";
}
sfEls[i].onmouseout=fun ction() {
this.className= this.className. replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachE vent) window.attachEv ent("onload", sfHover);
Thanks!
Jim
I'm curious about this syntax:
<variable>=func tion(){...}
I'm not finding a definition of this syntax, but I see it used at this
website:
Here's the usage (in a few different lines) I found there:
sfHover = function() {
var sfEls = document.getEle mentById("nav") .getElementsByT agName("LI");
for (var i=0; i<sfEls.length ; i++) {
sfEls[i].onmouseover=fu nction() {
this.className+ =" sfhover";
}
sfEls[i].onmouseout=fun ction() {
this.className= this.className. replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachE vent) window.attachEv ent("onload", sfHover);
Thanks!
Jim
Comment