title: jQuery - catch <input type="button" onclick location based on class
body: <p>I have a button using the onclick fct :</p>
  
  <pre><code>&lt;input type="button" onclick="document.location = 'mylocation.html';"  class="button urlToMainDiv" value="Back"&gt;
  </code></pre>
  
  <p>I would like to catch the called url using jQuery (based on the used class) to be able to use jQuery.load instead.</p>
  
  <p>I have tried many selectors but I'm not able to catch the called url.</p>
  
  <p>Like this one :</p>
  
  <pre><code>jQuery(".urlToMainDiv input").click(function(e){     
       e.preventDefault(); 
      load_ajax_content(this.href,divId,1);       
  }); 
  </code></pre>
  
  <p>Any id or solutions ?</p>
  
  <p>Thanks for your help.</p>