$(this).closest('table').find('.total1').val(($(this).closest('table').find('.total').val() * price) / $(this).closest('table').find('.inrvalue').val());
How will i round off the total1 value to 3 decimals?
$(this).closest('table').find('.total1').val(($(this).closest('table').find('.total').val() * price) / $(this).closest('table').find('.inrvalue').val());
How will i round off the total1 value to 3 decimals?
Number.toFixed(n)
This is native JS, no need for a particular JQuery function.
var value = 10.123456.toFixed(3);
// value = 10.123
You can assign total1 value into different variable and do like this;
var total1= 4.34597;
var total1Rounded= Math.round(total1* 1000) / 1000;