How to not populate contents inside a given div
<pre><code>&lt;body&gt;
&lt;div id = "container1" &gt;
&lt;div id = "x1" /&gt;
&lt;div id = "x2" /&gt;
&lt;div id = "x3" /&gt;
&lt;/div&gt;

&lt;div id = "container2" &gt;
&lt;div id = "Y1" /&gt;
&lt;div id = "Y2" /&gt;
&lt;div id = "Y3" /&gt;
&lt;/div&gt;

&lt;div id = "container3" &gt;
&lt;div id = "Z1" /&gt;
&lt;div id = "Z2" /&gt;
&lt;/div&gt;
&lt;/body&gt;

$('body div').each(function(i) {
if($(this).attr('id')!='container2') {  //This is only for div container2 &amp; not for elements inside it
    console.log(i);
}
});
</code></pre>

<p>I don't want the elements within a particular div say container2 to be populated how can this be done..
in above code it populates the div's inside container2</p>
