I have a form like this
<form id="add-to-cart" action="http://example.com/add_to_form" method="post">
  <div>
  <input type="hidden" name="cartkey" value="">
  <input type="hidden" name="id" value="10">
  <a href="#" id="10"  class="buy-now-button">buy Now</a>
  </div>
  <div>
  <input type="hidden" name="cartkey" value="">
  <input type="hidden" name="id" value="12">
  <a href="#" id="12" class="buy-now-button">buy Now</a>
  </div>
  <div>
  <input type="hidden" name="cartkey" value="">
  <input type="hidden" name="id" value="19">
  <a href="#" id="19"  class="buy-now-button">buy Now</a>
  </div>    
</form>
and I want to submit the form using jquery by taking the id. So can someone kindly tell me how to do this?
Update You can see with each link I have the id. I just want to pass this id to the form action.
 
     
     
     
     
     
     
    