title: How to find which button was used on the submit
body: <p>I am trying to distinguish which button/link was pressed on the submit. I am generating a product to purchase like so:</p>
  
  <pre><code>var product = JSON.parse(data);
  
  var html = '';
  html += '&lt;div&gt;'
  html += '&lt;form class="buy-product" &gt;';
  html += '&lt;div class="product_title"&gt;Price&lt;/div&gt;'
  html += '&lt;div class= "product_info_2" &gt;' + product['product_price'] + '&lt;/div&gt;'
  html += '&lt;div class= "product_info_2" &gt;' + product['product_description'] + '&lt;/div&gt;'
  html += '&lt;div class="product_title"&gt;Image&lt;/div&gt;'
  html += '&lt;div class= "product_info_2" &gt;Coming Soon&lt;/div&gt;'
  html += '&lt;input type="hidden" name="product_id" value="' + product['product_id'] + '" id="product_id" &gt;'
  html += '&lt;a href="#" class="button rightButton submit" id="add-to-cart-button" style="margin-right:100px;" &gt;Add To Cart!&lt;/a&gt;'
  html += '&lt;a href="#" class="button rightButton submit" id="view-product-button" &gt;Buy It Now!&lt;/a&gt;'
  html += '&lt;/form&gt;'
  html += '&lt;/div&gt;'
  
  $('#product .toolbar h1').html(product['product_name']);
  $('#view-product').html(html);​
  </code></pre>
  
  <p>And I am getting that the product was submitted like this:</p>
  
  <pre><code>$('#product').on('submit', '.buy-product', function() {
      var product_id = $(this).children('input[name=product_id]').val();
      createPurchaseView(product_id);
      jQT.goTo('#purchase');
  });​
  </code></pre>
  
  <p>But how can I distinguish between the 'Add To Cart' vs the 'Buy Now' being pressed?</p>