title: jQuery Validate determine which button used in a form submit
body: <p>I'm trying to determine button was used to submit the form. </p>
  
  <p>I have two buttons - cancel and submit within the form and depending on which one is clicked I want to carry out some functions before the submit happens. </p>
  
  <p>I can determine the value from the POST in the server side but need to do so on the client side first</p>
  
  <p>What jquery function do I call to determine if the 'cancel' button was used?</p>
  
  <p>The submit of the form is being handled as part of the submitHandler event of jquery validation.</p>
  
  <p>Here's the elements:</p>
  
  <pre><code>&lt;input name="submit" type="submit" value="Submit" /&gt;
  &lt;input name="cancel" type="submit" value="Cancel" /&gt;
  </code></pre>
  
  <p>Here's the submit handler:</p>
  
  <pre><code>submitHandler: function(form) {
                      form.submit();
                      }
  </code></pre>
  
  <p>Thanks</p>