I add the numbers entered in some inputs and get the total. The overall script works, however now I do not want to include the inputs that will be taken into account if they are disabled. I think I need to use: not (: disabled), but not sure how to put it in my script correctly?
This is a script that is considered:
$('.observationPositive').each(function(){
countP++;
sumP += Number($(this).val());
});
How can I say only the account, if not disconnected? (mistakenly encoded example)
$('.observationPositive').each(function(){
countP++;
sumP += Number($(this:not(:disabled)).val());
});
source
share