Jump to content

Make Submenu Underline


Recommended Posts

I found a script by Sandeep Gangadharan and tried to add one function to the submenu. http://javascript.internet.com/navigation/...ith-memory.htmlI want to make the submenu underline when it click.For example:About Us - Our company - Our Services - Our StaffWhen the user click on "Our Services" this submenu will underline which will remain the user here you are.Here are the partial js from Sandeep. For full js please visit the link above. Thank you for anyone read and try to help.function openClose(theName, menuArray, theID) { for(var i=0; i < menuArray.length; i++) { if (menuArray == theID) { if (document.getElementById(theID).style.display == "block") { document.getElementById(theID).style.display = "none"; document.getElementById("tick_"+menuArray).innerHTML = "+"; document.getElementById("toc_"+menuArray).innerHTML = "*"; eraseCookie(theName); } else { document.getElementById(theID).style.display = "block"; document.getElementById("tick_"+menuArray).innerHTML = "-"; newCookie(theName,menuArray,exp); } } else { document.getElementById(menuArray).style.display = "none"; document.getElementById("tick_"+menuArray).innerHTML = "+"; } }}function memStatus() { var num = readCookie("MN"); if (num) { document.getElementById(num).style.display = "block"; document.getElementById("tick_"+num).innerHTML = "-"; } var num1 = readCookie("SB"); if (num1) { document.getElementById(num1).style.display = "block"; document.getElementById("tick_"+num1).innerHTML = "-"; } }

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...