sum total value of button(clicked or selected)
hi everyone,
i'm stuck on something. i need to know how possible it's to get the sum value of buttons click in a DOM. Usually, if a radio button is used i get the total value using these codes.
$("[type='radio']").change(function () {
var totalPoint = 0;
$("[type='radio']:checked").each(function () {
totalPoint += Math.ceil($(this).val());
});
however i'm using a group button in this case. Is there anything i could do? help me please.
here's my fiddle just in case.
https://jsfiddle.net/samcyn/d4Ljeqdt/