Output img.currentSrc of srcset using jQuery
<p>I need to output the current source of an image using a jQuery alert:</p>

<pre><code>alert($('.someclass img').attr('currentSrc'));
</code></pre>

<p>...however the alert is outputting undefined.</p>

<p>For reference, the mark-up is as follows:</p>

<pre><code>&lt;div class="someclass"&gt;
    &lt;img srcset="http://example.com/A.png, http://example.com/A@2x.png 2x"&gt;
&lt;/div&gt;
</code></pre>