I have a gridview with dynamically added rows. I need to do some calculation using jquery when textbox changed. Below is my jquery function .But it is not firing . Is there any other method to find the controls. Please help
<script>
$(function () {
$('#<%=gvConsumableUsageAdd.ClientID %>').find('input:text[id$="txtQuantity"]').keyup(function () {
debugger;
var price = $('#<%=gvConsumableUsageAdd.ClientID %>').find('span[id$="lblUnitPrice"]').text();
var qty = $('#<%=gvConsumableUsageAdd.ClientID %>').find('input:text[id$="txtQuantity"]').val();
var total = parseFloat(price * qty);
$('#<%=gvConsumableUsageAdd.ClientID %>').find('span[id$="lbtTotalAmount"]').text(total.toFixed(2));
});
});
</script>
Thanks in Advance
debugger? that line is literally not doing anything except perhaps throwing an error (causing your script to fail) - winhowes