javascript - Drop down menu not dropping -


i attempting simple drop down menu using javascript when hover on link should display drop down menu nothing happens. think wrong javascript?

javascript:

function onhover( divid )     {         var div = document.getelementbyid( divid );          if (div)         {             div.classname = "unhidden";         }     }      function onleave( divid )      {         var div = document.getelementbyid( divid );          if (div)         {             div.classname = "hidden";         }     } 

my css:

.hidden { visibility: hidden; } .unhidden { visibility: visible; z-index: 30; } 

and html:

<li> <a onmouseover="onhover('otherlinks)" onmouseout="onleave('otherlinks')">other links</a> <div class="hidden" id="otherlinks" onmouseover="onhover('otherlinks)" onmouseout="onleave('otherlinks')">     <ul>     <li><a href="events.html">events</a></li>     <li><a href="foodnutrition.html">food & nutrition</a></li>     <li><a href="faq.html">faq</a></li>     </ul> </div> </li> 

is there reason why you're using javascript drop downs , not html , css?

son of suckerfish drop downs place start html , css drop down option: http://htmldog.com/articles/suckerfish/dropdowns/


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -