Jquery - Get the ID of an element using find()
<p>how can i get the id of an element by using the find method?</p>

<p><strong>HTML</strong></p>

<pre><code>&lt;div id="d1" class="line1"&gt;blib blab blub &lt;/div&gt;
</code></pre>

<p><strong>JS</strong></p>

<pre><code>$(function() {

      // hit_id = $(".line1").find("blab").attr('id');
         hit_id = $(".line1").match(/blab/).attr('id');    

         $('body').append(' - '+hit_id+' - ');
});
</code></pre>

<p><strong>Working example</strong>
<a href="http://www.jsfiddle.net/V9Euk/496/" rel="nofollow">http://www.jsfiddle.net/V9Euk/496/</a></p>

<p>Thanks in advance!</p>

<p>Peter</p>
