title: Click a submit button in the hidden form using jquery?
body: <p>I have 25 products showing in a page. Each product contains a form within it.
  As I have to drag a product to the mini cart on the right. For this I need the form id of the product to be dragged.</p>
  
  <p>With the help of jquery I am getting the id of the form. Now I want to click the submit button within that form. Is there any way to do this with the help of jquery.</p>
  
  <p>I am using jquery find function , but its not working.</p>
  
  <p>Here is my jquery code : </p>
  
  <pre><code>$("#ajaxCartUpdate").droppable({
                  accept:'.ui-draggable',
                  drop: function( ev, ui ) {
                      var td_obj = document.getElementsByClassName('view-test-attributes')[0].getElementsByTagName('table')[0].getElementsByTagName('td');                        
                      var form_id = td_obj[td_obj.length-1].getElementsByTagName('form')[0].id;
                      document.getElementById(form_id).action = '';
                      document.getElementById(form_id).find('.ajax-cart-submit-form-button').click();
  
                  }
              });
  </code></pre>
  
  <p>Here is my HTML :</p>
  
  <pre><code>&lt;div class="add-to-cart"&gt;
    &lt;form class="ajax-cart-submit-form" id="uc-product-add-to-cart-form-2-1" method="post" accept-charset="UTF-8" action="/js_ajax/"&gt;
  &lt;div&gt;
      &lt;input type="hidden" value="1" id="edit-qty-3" name="qty"&gt;
      &lt;input type="submit" class="form-submit node-add-to-cart ajax-cart-submit-form-button ajax-cart-processed" value="Add to cart" id="edit-submit-2" name="op"&gt;
     &lt;input type="hidden" value="form-c75deef67555676e4579cd756840cea6" id="form-c75deef67555676e4579cd756840cea6" name="form_build_id"&gt;
     &lt;input type="hidden" value="dece0af3cebbdc2ad735891fc7639321" id="edit-uc-product-add-to-cart-form-2-form-token-1" name="form_token"&gt;
     &lt;input type="hidden" value="uc_product_add_to_cart_form_2" id="edit-uc-product-add-to-cart-form-2-1" name="form_id"&gt;
     &lt;input type="hidden" value="2" id="edit-product-nid-3" name="product-nid"&gt;
  
   &lt;/div&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>I think this is not a big issue, but somehow I am not able to fix it.
  Your help is really appreciated.</p>