J
Jim Moon
Hi.
I'm curious about this syntax:
<variable>=function(){...}
I'm not finding a definition of this syntax, but I see it used at this
website:
http://www.htmldog.com/articles/suckerfish/dropdowns/
Here's the usage (in a few different lines) I found there:
sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls.onmouseover=function() {
this.className+=" sfhover";
}
sfEls.onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
Thanks!
Jim
I'm curious about this syntax:
<variable>=function(){...}
I'm not finding a definition of this syntax, but I see it used at this
website:
http://www.htmldog.com/articles/suckerfish/dropdowns/
Here's the usage (in a few different lines) I found there:
sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls.onmouseover=function() {
this.className+=" sfhover";
}
sfEls.onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
Thanks!
Jim