title: SharePoint; Javascript repeating click event already on page
body: <p>I have a SharePoint calendar, and I've got some Javascript code to force a calendar overlay event to open in a modal dialog. Basically, it forces them to open in a modal dialog via this code:</p>
  
  <pre><code>$('.ms-acal-ddiv a').click(function(){ 
       EditLink2(this,'WPQ2');
       return false; 
  });
  </code></pre>
  
  <p>The problem is that there are already "native" events on the calendar which open with this code, and what is happening is that when you click on it, the events open TWICE with a modal dialog, thus rendering the page unusable. </p>
  
  <p>I'm not savvy with writing jquery or javascript. How can I write the javascript to look for that code that's bolded, and prevent it from running if the link already executes with that?</p>
  
  <p>Thanks for the help in advance.</p>