title: capture JavaScript onClick JQuery
body: <p>I have a div that pops up when a user clicks on a link that will take them off of the english version of the site.  They are given a yes or no choice to proceed.  I have to capture the "URL" of where they will go to if they click yes.  This is easy on the links that are a hrefs, but some of the links are onClicks that execute JavaScript.  I have to capture the JavaScript, keep it from executing, and then execute it if they click yes.  This is the capture onClick code I've got, but how do I get it to work?</p>
  
  <pre><code>$_('a#foo').live('click', function(event) {
      var onclick = $(this).attr("onclick");
      $_('#yes a').attr('onclick', onclick);*/
      return false;
      event.preventDefault();
  });
  </code></pre>
  
  <p>the yes button/div</p>
  
  <pre><code>$_('#yes').live('click', function() {
      if(href) {
          window.location=href;
      };
      if(onclick) {
          eval(onclick);
      }
  });
  </code></pre>