PDA

View Full Version : Editing a current menu script



timothy79
01-21-2005, 03:19 AM
I am referring to the script found on this page:

http://www.dynamicdrive.com/dynamicindex1/ddtabmenu2.htm

this script is perfect, i am only trying to add a OnmouseOut to it. As it is the button does not go to an original state when the users mouse goes of the tab it just stays on whatever was select last.

Can I be helped to add a mouseOut state that when the users mouse goes of the tab the tab plays its orignal state of being non selected/highlighted. I'm not programming genious so your help is super appreciated.

Minos
01-21-2005, 04:06 AM
If you delete the javascript function highlighttab:


function highlighttab(aobject){
if (typeof tabobjlinks=="undefined")
collectddimagetabs()
for (i=0; i<tabobjlinks.length; i++)
tabobjlinks[i].className=""
aobject.className="current"
}


Then, delete the call to that function in expandcontent (!!!just the line that says highlighttab(aobject)!!!):


function expandcontent(cid, aobject){
...
if (document.getElementById && turntosingle==0){
highlighttab(aobject)
...
}
}


and finally, in the <style> tags, change:

#ddimagetabs a:hover, #ddimagetabs a.current{
to:

#ddimagetabs a:hover{