You are here: Son of suckerfish onClick problem « HTML « IT news, forums, messages
Son of suckerfish onClick problem

Posted by Chris on 11/27/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);

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация