Jquery adding href to link which includes javascript function
<p>Was looking at ways to clean up the following link :</p>

<pre><code>    &lt;a href="javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)%7D)());"&gt;&lt;img src="/images/Social%20Media/pinterest.png"/&gt;&lt;/a&gt;
</code></pre>

<p>To something like</p>

<pre><code>&lt;a id="pinterest&gt;&lt;img src="/images/Social%20Media/pinterest.png"/&gt;&lt;/a&gt;
</code></pre>

<p>and the href part through Jquery</p>
