How to find out what's the first child tag name?
<p>I need to find what the first child of an element is.</p>

<h3>For example:</h3>

<pre><code>&lt;div class="parent"&gt;
    &lt;div class="child"&gt;&lt;/div&gt;
    &lt;img class="child" /&gt;
    &lt;div class="child"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>In this example the FIRST child is a <code>div</code>.</p>

<h3>Another example:</h3>

<pre><code>&lt;div class="parent"&gt;
    &lt;img class="child" /&gt;
    &lt;img class="child" /&gt;
    &lt;div class="child"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>In this example the first child is a <code>img</code>.</p>
