Jump to content

Drop down menu


Recommended Posts

Hi everyone,


Please reference this drop down menu that's broken: http://www.dinosaurindustries.com/menu/menu.html


I have an unordered list with entries for types of dinosaurs. All fields except the top one are hidden. When I mouseover, I am trying to use a JavaScript function to change the visibility of the other list items to visible.


function unhideChildren(parentid, childtype) { 
       var parentAsElement = document.getElementById(parentid); 
var arrayOfChildren = parentAsElement.getElementsByTagName(childtype);
var childCount = arrayOfChildren.length; 
for (i=0; i<=childCount; i++) {
	arrayOfChildren[i].style.visibility = "visible;"



I think my issue is that when I run that for loop, the arrayOfChildren is just an array of list items, and I can't directly access the style property on them. But I'm not sure what to do about that..



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...