How can i add inline onclick event to hyper links using jquery?
<p>I need to generate nearly 80 hyperlinks using jQuery. I did that, all are fine. Now my client wants me to add a click event on to the hyperlinks? How can i do that?</p>

<p>my present link is :</p>

<pre><code>&lt;a href="#" class="removed purchase-btn"&gt;Long Sleeve Breton Top&lt;/a&gt;
</code></pre>

<p>but i need to add this :</p>

<pre><code>$('&lt;a onclick="site.exec('page', 'openInternal', {'url': 'http://www.site.in/en-GB/Products/quickshop.aspx?qsi=AM154YEL&amp;amp;});"  href="#"&gt;link'+i+'&lt;/a&gt;').appendTo('#hello');
  }
</code></pre>

<p>for that, i used this function but there is no use:</p>

<pre><code>$(function (){

  for(i=0;i&lt;80;i++){
    $('&lt;a onclick="site.exec('page', 'openInternal', {'url': 'http://www.site.in/en-GB/Products/quickshop.aspx?qsi=AM154YEL&amp;amp;});"  href="#"&gt;link'+i+'&lt;/a&gt;').appendTo('#hello');
  }

})
</code></pre>

<p>But it's not working. Any ideas to make this work?</p>

<p>This links i need to generate and put in to application. so directly a click event from jquery i can't use. Strictly i need to place this code in inline..</p>
