Get child tagname of an element
<p>I want to get the child tag name of an element.</p>

<p>HTML:</p>

<pre><code>&lt;div class="element"&gt;
    &lt;h1&gt;title&lt;/h1&gt;
&lt;/div&gt;
&lt;div class="element"&gt;
    &lt;img src="http://2.bp.blogspot.com/-ma66w8WJsZ0/UBVcmt3XS4I/AAAAAAAAAWw/4UyVd2eR8A0/s1600/olympic-logo.thumbnail.jpg" /&gt;
&lt;/div&gt;
&lt;div id="debugger"&gt;&lt;/div&gt;
</code></pre>

<p>​
jQuery:</p>

<pre><code>$(".element").bind("click", function(){

    var child = $(this).add("first-child").prop("tagName");

    $("#debugger").html(child);

});​
</code></pre>

<p>I don't understand why I'm always getting DIV as the result...</p>

<p>Thank you.</p>

<p><a href="http://jsfiddle.net/8Xg3G/2/" rel="nofollow">http://jsfiddle.net/8Xg3G/2/</a></p>
