PDA

View Full Version : SuckerTree Vertical Menu MouseOut Delay Help



Mr_Blik
02-03-2009, 10:08 PM
1) Script Title: SuckerTree Vertical Menu (v1.1)

2) Script URL (on DD): http://www.dynamicdrive.com/style/csslibrary/item/suckertree-menu-vertical/

3) Describe problem: Not so much a problem than a request for some help for a poor old Noob :). I'd like to modify the code to incorporate a delay on the mouseout event so that the sub-menus don't disappear so quickly. Any help would be greatly appreciated.

Nile
02-04-2009, 01:33 AM
Here, try changing:


ultags[t].parentNode.onmouseout=function(){
this.getElementsByTagName("ul")[0].style.display="none"
}

To:


ultags[t].parentNode.onmouseout=function(){
var a = this;
setTimeout(function(){
a.getElementsByTagName("ul")[0].style.display="none";
}, 100);
}

Mr_Blik
02-04-2009, 05:49 AM
Nile: Thank you for the reply... It worked, but not the way I was hoping. For some reason the setTimeout works when you mouseout from the Level 1 Header and mouseover another Level 1 Header, but when you mouseout from a Level 1 Header to its Level 2 Sub Header, the Level 2 Sub Header disappears. I was hoping to have the setTimeout work only when someone mouseout's from the Level 2 Sub Header. Not sure why it wouldn't work. Any ideas?

Nile
02-04-2009, 12:48 PM
Please post a link to the page on your site that contains the problematic script so we can check it out.
Please include your code so that we can take a look at it, we can't do much without it.