title: Javascript event listener refresh
body: <p>I have some javascript that I inherited for my job. In this javascript we have a side bar that is constantly updated(every 1 - 10 or so minutes). In the script we parse and process the AJAX from the server and then we call an interesting function. </p>
  
  <pre><code>function renewClicks(){
      $('.classElem').unbind('click'); 
      $('.classElem2').unbind('click');
      $('.classElem3').unbind('click'); 
  
      $('.classElem').click(elm1funct); 
      $('.classElem2').clikc(elm2funct);
      $('.classElem3').click(elm3funct);  
  }
  </code></pre>
  
  <p>Where .classElem is a css class selector that is appended to each image that is added to the page. And elmfunct is a function that is written to handle the click. This runs on each update (deauthorizing valid already added elements and then re adding them all). I want to know if there is a way I can possibly attach a listener on the body element in the DOM so that all of the image elements added to the page and that inherit the css class will already be handled and therefore not unregistered and re-registered on each update. </p>
  
  <p>Thank you for any info you can provide. </p>