title: jQuery events on dynamically produced links
body: <p>I have a list of links that are being created dynamically by another function they are in the form <code>&lt;a id="hi-1"&gt;test&lt;/a&gt; &lt;a id="hi-2"&gt;test&lt;/a&gt;</code> etc.</p>
  
  <p>I am trying to target these links and bind click/mouseover events to them. The following is the code for targeting one of these link(#hi-1):</p>
  
  <pre><code>$(function() {
  
      $("#hi-1") .bind("mouseover", highlight);
      $("#hi-1") .bind("mouseleave", highlight);
              $("#hi-1") .bind("click", highlight);
  
      });
      function highlight(evt){
      $("p#p-1").toggleClass("highlighted");
      }
  </code></pre>
  
  <p>This should toggle the class name of .</p>
  
  <p>I can't seem to get it to work, I believe it could be something to do with the fact that the links are created dynamically. However i have little jQuery experience and i may be going about it the wrong way.</p>
  
  <p>Any Help is much appreciated.</p>