title: jQuery sum multiples input fields (price * quantity) dynamically added with same class
body: <p>I have a <code>.click</code> function, each time is executed  it adds a group of three divs in a page.
  the first div is a number and is multiplied for the second div that holds a currency value; the result is shown in the third div.
  I'm trying to write a <code>.each</code> function to calculate the results separately, but it seems that i can not. I feel that should be simple, but i'm missing something. Can someone help? Thanks
  here is the code I wrote so far (i tried many different ways...):</p>
  
  <p>===UPDATE====
  I updated my code, i added a counter that add an incremental number to the  the classes, but I'm still without solution. The code now is</p>
  
  <pre><code>    &lt;ul&gt;
          &lt;li&gt;Quantità: &lt;span&gt;&lt;input type="text" name="Quantita" value="" class="currency2"&gt;&lt;/span&gt; (metti due decimali - 0.00)&lt;/li&gt;
          &lt;li&gt;Valore unitario: &lt;span&gt;&lt;input type="text" name="ValoreUnitario" value="" class="valore_unitario2"&gt;&lt;/span&gt;&lt;/li&gt;
          &lt;li&gt;Valore totale: &lt;span&gt;&lt;input type="text" name="ValoreTotale" value="" class="somma2"&gt;&lt;/span&gt;&lt;/li&gt;                        
      &lt;/ul&gt;
      &lt;ul&gt;
          &lt;li&gt;Quantità: &lt;span&gt;&lt;input type="text" name="Quantita" value="" class="currency3"&gt;&lt;/span&gt; (metti due decimali - 0.00)&lt;/li&gt;
          &lt;li&gt;Valore unitario: &lt;span&gt;&lt;input type="text" name="ValoreUnitario" value="" class="valore_unitario3"&gt;&lt;/span&gt;&lt;/li&gt;
          &lt;li&gt;Valore totale: &lt;span&gt;&lt;input type="text" name="ValoreTotale" value="" class="somma3"&gt;&lt;/span&gt;&lt;/li&gt;                        
     &lt;/ul&gt;
     &lt;ul&gt;
          &lt;li&gt;Quantità: &lt;span&gt;&lt;input type="text" name="Quantita" value="" class="currency4"&gt;&lt;/span&gt; (metti due decimali - 0.00)&lt;/li&gt;
          &lt;li&gt;Valore unitario: &lt;span&gt;&lt;input type="text" name="ValoreUnitario" value="" class="valore_unitario4"&gt;&lt;/span&gt;&lt;/li&gt;
          &lt;li&gt;Valore totale: &lt;span&gt;&lt;input type="text" name="ValoreTotale" value="" class="somma4"&gt;&lt;/span&gt;&lt;/li&gt;                        
     &lt;/ul&gt;
  
  
      $(".currency"+ counter , ".valore_unitario" + counter).on("change keyup keydown paste propertychange bind mouseover", function(){
      var rate = parseFloat($(".currency" + counter ).val()) || 0;
      var box = parseFloat($(".valore_unitario" + counter).val()) || 0;
  
      $(".somma" + counter ).val(parseFloat(rate * box).toFixed(2));    
  
  });
  </code></pre>
  
  <p>});</p>