YADM-Yet Another Dynamic Menu - How it Works (Page 3 of 4 )
Check if the browser is capable of using DOM
Check if the element with the ID nav is available
Loop through all the LIs inside this UL
Check if either the LI or any of the LIs inside the nested UL contain the class current.
If that is not the case, apply the class isParent to the LI and hiddenChild to the nested UL.
If that is the case, apply the class isActive to the LI and shownChild to the nested UL.
If there is no current in the LI, apply a function that swaps the classes (isParent becomes isActive and hiddenChild shownChild) and renders the link inside the LI useless (to avoid clicking and loading the page instead of showing the menu)
If there is no class called nohover in the main UL, apply the class onmouseover and onclick and revert to the original state onmouseout.