barryevans
11-16-2010, 10:52 AM
1) Script Title: DD Tab Menu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm
3) Describe problem:
I was just wondering if there is a way to add a delay before the tab changes.
I have managed to find a post in the archive that comes pretty close, it adds the delay but both tabs are highlighted for the delay period and then it jumps to the new tab if you stay on it for the whole delay period.
What I would like it to do is...
On mouse over do nothing, 500ms later if the user stays on the new tab select it.
Here is the code I am using so far...
[CODE]
menuitems[x].onmouseover=function(){
clearTimeout(ddtabmenu.timer);
var t=this;
t.onmouseout=function(){clearTimeout(ddtabmenu.timer);}
ddtabmenu.timer=setTimeout(function(){ddtabmenu.showsubmenu(tabid, t);},1000);
};
[CODE]
Thanks in advance :)
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm
3) Describe problem:
I was just wondering if there is a way to add a delay before the tab changes.
I have managed to find a post in the archive that comes pretty close, it adds the delay but both tabs are highlighted for the delay period and then it jumps to the new tab if you stay on it for the whole delay period.
What I would like it to do is...
On mouse over do nothing, 500ms later if the user stays on the new tab select it.
Here is the code I am using so far...
[CODE]
menuitems[x].onmouseover=function(){
clearTimeout(ddtabmenu.timer);
var t=this;
t.onmouseout=function(){clearTimeout(ddtabmenu.timer);}
ddtabmenu.timer=setTimeout(function(){ddtabmenu.showsubmenu(tabid, t);},1000);
};
[CODE]
Thanks in advance :)