title: Get first child node of specific type - JavaScript
body: <p>Is it possible to get a child dom element, which will be the first child of a specific type.</p>
  
  <p>For example in both of these examples I want to get the <code>img</code> element:</p>
  
  <pre><code>&lt;a id="mylink" href="#"&gt;&lt;img src="myimage.jpg" /&gt;&lt;/a&gt;
  </code></pre>
  
  <p>vs.</p>
  
  <pre><code>&lt;a id="mylink" href="#"&gt;&lt;span&gt;&lt;/span&gt;&lt;img src="myimage.jpg" /&gt;&lt;/a&gt;
  </code></pre>