title: How to fetch img srcset url using jquery
body: <p>I have an image tag with srcset attribute holding a value(url). Now i need to fetch and generate same for src attribute as well. </p>
  
  <pre><code>$('img').attr('srcset')
  </code></pre>
  
  <p>The above code is not working and returns undefined. </p>
  
  <pre><code>&lt;img srcset="http://s7d2.scene7.com/is/image/Hod/Mobile600x160?$600x160$" alt=""&gt;
  </code></pre>
  
  <p>I need to fetch above srcset value("<a href="http://s7d2.scene7.com/is/image/Hod/Mobile600x160" rel="nofollow">http://s7d2.scene7.com/is/image/Hod/Mobile600x160</a>?$600x160$") and append the same value for src attribute. Kindly help.</p>
  
  <p>Thanks in advance.</p>