jQuery replace attr scource with var
<p>How can I change image source attribute with var</p>

<pre><code>$(this).attr('src','' +myVar+ '')

var myVar = "img/image.png";
</code></pre>

<p>i tried like this.</p>
