SHARE
TWEET

Untitled

a guest Nov 14th, 2012 19 Never
  1. <div id="quantityHoleForPercentage">
  2. <form:input path="quantity11Profit"  id="quantity11Profit" cssClass="smaller" />                              
  3. </div>
  4. <div id="quantityHoleForPercentage">
  5. <form:input path="quantity11Price"  id="quantity11Price" cssClass="smaller" />
  6. </div>
  7.        
  8. $("#quantityHoleForPercentage input").change(function(){                    
  9.     var needless=$(this).attr('id');
  10.     var willWriteToPriceInput= $(this).val();
  11.     var priceInput=$(this).next();
  12.     priceInput.val(willWriteToPriceInput);
  13.     });
  14.        
  15. $("#quantityHoleForPercentage input[id$=Profit]").change(function(){
  16.   var willWriteToPriceInput= $(this).val();
  17.   var priceInput = $(this).parent().next()
  18.   priceInput.val(willWriteToPriceInput);
  19. });
RAW Paste Data
Top