PDA

View Full Version : DD Tab menu - return to current tab



roystik
02-22-2008, 05:32 AM
1) Script Title: DD Tab menu

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm

3) Describe problem:
I have modified this script so that when hovering over one of the main tabs, another layer of links (submenu) is listed horizontally below the main tabs. Once the submenu is shown for a hovered main tab, it stays until another main tab is hovered.

Now what I want to do is this: when the user moves his mouse over to another tab, I want the hovered main tab and submenu to show and when the mouse is not hovering over any tab or submenu, then it will revert to the current tab and submenu.

Hope that made sense :D

Master_script_maker
02-22-2008, 02:12 PM
Please show the modified script so we can help you to a better extent.

roystik
02-23-2008, 05:32 AM
The script is still the same, I just changed this part of Example 4:


<DIV class="tabcontainer">

<div id="sc1" class="tabcontent">
Sub contents here
</div>

<div id="sc2" class="tabcontent">
Sub contents here
</div>

<div id="sc3" class="tabcontent">
Sub contents here
</div>

</DIV>

Everything else (javascript, css) is the default code.

ddadmin
02-23-2008, 09:33 AM
Try the below modified ddtabmenu.js, and refer to the variable at the top:


snap2original: [true, 500], ////Should tab revert back to default selected when mouse moves out of menu? ([true/false, miliseconds_b4_revert]

roystik
02-23-2008, 11:21 AM
Thanks for the js, will try it and let you know how it works out.

UPDATE: It works! Awesome! A great big thank you to ddadmin is in order.