1

i'm not sure but if i understood right js nextSibling focus next node ? So why i get trouble, when i want to select ul in a li ?

    <ul>
<li><input id="btn-page" type=button onclick="displayMenu();" /></li>
    <ul class="hide">
        <li>Some text</li>
    </ul>
    <li>...</li>
   </ul>

And my js function :

    function displayMenu() {
   var idMenu = event.target.id;
   var ulDisplay = document.getElementById(idMenu).nextSibling;
   ulDisplay.style.display = 'block';
}

I think i forgot something but i don't know why. Thanks for help :)

TikTaZ
  • 670
  • 1
  • 11
  • 32
  • 1
    The edited html isn't valid. There are only `
  • `s allowed as direct childs of an `
      ` - http://www.w3.org/TR/html401/struct/lists.html#h-10.2
    – Andreas Aug 30 '12 at 12:53