I am using code to update txtunitprice value based on other on click of button having class updateprice as follow
$('.updateprice').click(function () {
var selectId = $(this).attr('id'); //get id of btnUpdatePrice
var rowNum = parseInt(/btnUpdatePrice(\d+)/.exec(selectId)[1], 10); //get row id
var quantity = $("#txtQuantity" + rowNum).val();
//this logic need to ask with kartik
$("#txtUnitPrice" + rowNum).val(quantity * $("#txtUnitPrice" + rowNum).val());
});
problem arising here is that if i click the btnupdateprice once it updates correctly but if i click again on that button this event fire agains and multiplies agains which is wrong please tell me solution
instead of using
$().click()in jquery, use