title: jQuery: get child attribute
body: <p>I have HTML like this:</p>
  
  <pre><code>&lt;div&gt;
      &lt;a href=""&gt;sometext&lt;img src="images/001.jpg" /&gt;&lt;/a&gt;
      &lt;a href=""&gt;sometext&lt;img src="images/002.jpg" /&gt;&lt;/a&gt;
      ...
      &lt;a href=""&gt;sometext&lt;img src="images/nnn.jpg" /&gt;&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>All i want is make 'href' atrributes equal to 'src' attribute of child 'img' using jQuery. This is my unsuccessful attempt (no js-error, but without result):</p>
  
  <pre><code>$('div a').attr('href', $(this).children('img').attr('src'));
  </code></pre>
  
  <p>How i can get 'src' attribute of child 'img' for use like attr() second argument for parent 'a'?</p>