I am trying to get values from input field using .each() and adding them to show the sum in another input value. But unfortunately in spite of using parseInt() I am
You are adding a NaN data type to an Number data type. So you need to restrict it before you perform your addition operation.
Please check this one
var totalvalue = 0;
$(document).on("focusout",".value",function() {
$(".value").each(function() {
if(isNaN($(this).val()) || $(this).val() != ''){
totalvalue = totalvalue + parseInt($(this).val());
}
});
$("#totalvalue").val(totalvalue);
});