title: jquery alert returns NaN
body: <p>I am new here, and new with JQuery, and i get stuck</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class='col-md-2'&gt;$pro_name&lt;/div&gt;
  &lt;div class='col-md-2'&gt;&lt;input type='text' class='form-control qty' pid='$pro_id' id='$qty-$pro_id' value='$qty' &gt;&lt;/div&gt;
  &lt;div class='col-md-2'&gt;&lt;input type='text' class='form-control price' pid='$pro_id' id='$price-$pro_id' value='$pro_price' disabled&gt;&lt;/div&gt;
  &lt;div class='col-md-2'&gt;&lt;input type='text' class='form-control total' pid='$pro_id' id='$total-$pro_id' value='$total' disabled&gt;&lt;/div&gt;
  </code></pre>
  
  <p>JQUERY:</p>
  
  <pre><code>$("body").delegate(".qty","keyup", function(){   
      var pid = $(this).attr("pid");          
      var qty = $("#qty-"+pid).val();
      var price = $("#price-"+pid).val();
      var total = qty * price;        
      alert(total);
  })
  </code></pre>
  
  <p>Jquery alert returns NaN. </p>