title: in jquery, how can i reference current form from button click
body: <p>I have a form below; I have changed the submit button to just type "Button" so I would be able to run some JavaScript before submitting the form: </p>
  
  <p>Here is my form:</p>
  
  <pre><code>&lt;form action="/Cart" method="post"&gt;
       &lt;input type="hidden" name="name" value="12" /&gt;
       &lt;input type="button" class="addToCartButton" value="Add to Cart" /&gt;
   &lt;/form&gt;
  </code></pre>
  
  <p>Here is my initial event handler:</p>
  
  <pre><code>$(document).ready(function () {
      $('.addToCartButton').click(function () {
  
         //need to reference current form here
         //need to reference the hidden input with name="Name" above
      });
  });
  </code></pre>
  
  <p>I have a number of these forms on the same page so I need to relatively reference the form and some other inputs inside that form.  What is the best way to doing it?  I was thinking about putting some prefix that would be unique to each form and then using that in the selector but that seems very hacky ...</p>