title: How to get the first child id inside the div using JQuery
body: <p>How to get the first child id inside the div using JQuery.</p>
  
  <p>Sample code:</p>
  
  <pre><code>&lt;div id='id1'&gt;
      &lt;a id='a1' /&gt;   
      &lt;a id='a2' /&gt; 
      &lt;a id='a3' /&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to get the id <code>a1</code>.</p>
  
  <p>I have tried <code>$('#id1 a:first-child').html()</code> to get the text. How to get the id?</p>