title: Issue using childNodes to process the childnodes javascript
body: <p>I am trying to make display none for all the child nodes of a div. It works well with getElementsByTagname('*')</p>
  
  <p>My Markup</p>
  
  <pre><code>&lt;div id="container"&gt;
      &lt;div id="child1"&gt;&lt;/div&gt;
      &lt;div id"child2"&gt;
          &lt;div id="inner-child"&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I would like to manipulate the display property of only the child1, child2.</p>
  
  <pre><code>      function hideAllChildren(){
          var elem = document.getElementById("container");
          var children = elem.childNodes;
          alert("children " + children.length)
          for (i=0; i &lt; children.length ;i++)
          {
          children[i].style.display="none";// Error - children[i].style undefined
          }
  
        }
  </code></pre>
  
  <p>Can you figureout what the issue could be ?</p>