Results 1 to 2 of 2

Thread: childNodes display none

  1. #1
    Join Date
    Feb 2009

    childNodes display none

    How can I get all the children of a div to be display none?

    <div id='parent'>
    <div id='child'></div>
    <div id='child'></div>
    <div id='child'></div>
    <div id='child'></div>

    I've tried: document.getElementById('textbox').childNodes.display='none';
    but that doesn't work.

  2. #2
    Join Date
    Feb 2006
    you could use javascript to apply (and remove, probably) a class to the container that is defined to have hidden children

    .hidechildren *{display:none}

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center