I have this small functions that trigger the even to calculate the numbers and sum of input fields with class mad
$(".mad").each(function() {
$(this).keyup(function() {
calculateSum();
});
});
However I have two types of input fields I need to calculate mad and mad2
so I was thinking if something like this would be possible to trigger the calculation on both mad and mad2 fields?
$(".mad" && ".mad2").each(function() {
$(this).keyup(function() {
calculateSum();
});
});