Posted by Chris on 11/06/81 11:56
I am using the son of Suckerfish dropdown technique to do drop down menus.
It is really cool but you need to attach some events to the LI and UL tags
to get it to work in IE(see http://www.htmldog.com/articles/suckerfish/). As
well as the hover creating a popup I would like to click on an an item to
create the popup. Adding the onClick event works but suddenly the mouseout
doesn't remove the popup. Can anyone help.
sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++)
{
sfEls[i].onclick=function()
{
this.className+=" sfhover";
}
sfEls[i].onmouseover=function()
{
this.className+=" sfhover";
}
sfEls[i].onmouseout=function()
{
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
[Back to original message]
|