On the Fly created/appended Divs-Not able to get the ID JQuery
<p>I'm creating Divs on the Fly. If I try to get the Attribute id of those Divs, I'm not able to get it.   </p>

<pre><code>$("#displayPanel div").click(function (){ alert($(this).attr("id")); } 

&lt;div id="displayPanel" class="displayPanel"&gt; 
      &lt;div id="heading"&gt; Display Panel &lt;/div&gt; &lt;br/&gt; 
      &lt;div id="save" class="saveClass"&gt;&lt;/div&gt; &lt;br/&gt; 
       &lt;div id="field1" class="my"&gt; &lt;/div&gt; 
       &lt;div id="field2" class="my"&gt; &lt;/div&gt; 
&lt;/div&gt;
</code></pre>

<p><code>Field1</code> and <code>Field2</code> are created and appended to the <code>DisplayPanel</code>. And I'm not able to get the id of those divs. But I'm getting the id for those other existing divs</p>
