title: jQuery take value for input[type ="text"] in jQuery data with defined variable
body: <p>I have my markup like this. Now here you can see every button has same class named button.</p>
  
  <pre><code>  &lt;div class="cart"&gt;
      &lt;input type="text" name="quantity" size="2" value="12" /&gt;
      &lt;input type="hidden" name="product_id" size="2" value="42" /&gt;
      &amp;nbsp;&lt;input type="button" value="add to cart" class="button-cart" class="button" /&gt;
    &lt;/div&gt;
  
    &lt;div class="cart"&gt;
      &lt;input type="text" name="quantity" size="2" value="132" /&gt;
      &lt;input type="hidden" name="product_id" size="2" value="42" /&gt;
      &amp;nbsp;&lt;input type="button" value="add to cart" class="button-cart" class="button" /&gt;
    &lt;/div&gt;
  
    &lt;div class="cart"&gt;
      &lt;input type="text" name="quantity" size="2" value="135" /&gt;
      &lt;input type="hidden" name="product_id" size="2" value="42" /&gt;
      &amp;nbsp;&lt;input type="button" value="add to cart" class="button-cart" class="button" /&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>Here is my jQuery script</p>
  
  <pre><code> jQuery('.button-cart').each(function() {
    jQuery(this).live('click',function() {
      console.log(jQuery(this));
      var s= jQuery(this).siblings('input[type="text"]');
      console.log(s);
      $.ajax({
          url: 'index.php?route=checkout/cart/add',
          type: 'post',
          data: $('.product-info input[type=\'text\'],.product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
          dataType: 'json',
          success: function(json) {
              $('.success, .warning, .attention, information, .error').remove();
  
              if (json['error']) {
                  if (json['error']['option']) {
                      for (i in json['error']['option']) {
                          $('#option-' + i).after('&lt;span class="error"&gt;' + json['error']['option'][i] + '&lt;/span&gt;');
                      }
                  }
              } 
  
              if (json['success']) {
                  $('#notification').html('&lt;div class="success" style="display: none;"&gt;' + json['success'] + '&lt;img src="catalog/view/theme/default/image/close.png" alt="" class="close" /&gt;&lt;/div&gt;');
  
                  //$('.success').fadeIn('slow');
  
                  $('#cart-total').html(json['total']);
  
                  $('html, body').animate({ scrollTop: 0 }, 'slow'); 
                  setTimeout(opencartpage(),1000);
              }   
          }
      });  
    });
  })
  </code></pre>
  
  <p>Now here you can see in <code>jQuery data .product-info input[type=\'text\']</code> is defined. In that place  it is taking the data for all the <code>input type text data</code>. In the same way I want to define  <code>jQuery(this).siblings('input[type="text"]')</code> which will take the input value for only selected button at that time for this I am using <code>this</code> inside class cart in ajax data .So can some one tell me how to do this?</p>