Son of suckerfish onClick problem

Discussion in 'HTML' started by Chris, Aug 23, 2006.

  1. Chris

    Chris Guest

    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.onclick=function()

    {

    this.className+=" sfhover";

    }

    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);
     
    Chris, Aug 23, 2006
    #1
    1. Advertising

  2. Chris

    Neredbojias Guest

    To further the education of mankind, "Chris" <>
    vouchsafed:

    > 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.


    This sounds like a focus matter.

    --
    Neredbojias
    Infinity has its limits.
     
    Neredbojias, Aug 24, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neo Geshel
    Replies:
    81
    Views:
    2,938
    diecleartype
    Jul 10, 2006
  2. Victoria Clare
    Replies:
    1
    Views:
    1,769
    Peter Mount
    Aug 16, 2004
  3. Neo Geshel
    Replies:
    6
    Views:
    516
    Neo Geshel
    Oct 24, 2004
  4. Chris

    Son of Suckerfish

    Chris, Jul 15, 2006, in forum: HTML
    Replies:
    2
    Views:
    462
    Usenet
    Jul 16, 2006
  5. z
    Replies:
    14
    Views:
    1,139
Loading...

Share This Page