oh god i dont know what to do here please help me...
i have this html code
<div id="project_math">
<form method="post">
Quantity : <input type="text" name="quatity" value="1" />
Amount : <input type="text" name="amounty" value="20" />
<span id="total">20</span>
</form>
</div>
jQuery
$(document).ready(function(){
/* COMPUTATION */
$('input[name=quantity_e]').keyup(function(){
var sum = $('input[name=amt_e]').val();
sum *= $('input[name=quantity_e]').val();
$("#total").text($(this).val());
});
});
what im trying to do is that when i keyup and input value like 2 or 10 it will times the value of it to the amount value so if i keyup 2 then the amount value is 20 the total should be 40.
is my jQuery wrong?