title: How to add onClick event to an a tag with class
body: <p>Here's what I have on a page</p>
  
  <pre><code>&lt;a class="download-link" href="http://www.test.com/pages-"&gt;Pages 1&lt;/a&gt;
  </code></pre>
  
  <p>Below is the Result I want to achieve with jQuery. </p>
  
  <pre><code>&lt;a class="download-link" href="http://www.test.com/pages-1.asp" onclick="_sz.push(['event', 'PDF', 'download', ('report') ])"&gt;Pages 1&lt;/a&gt;
  </code></pre>
  
  <p>jQuery</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;/
  $('.download-link').each(function(){
      this.href += '-1.asp';
      this.attr('onclick', '_sz.push(['event', 'PDF', 'download-request', ('report') ])');
  })
  &lt;/script&gt;
  </code></pre>