L
L
Lavrov952018-03-30 14:07:24
JavaScript
Lavrov95, 2018-03-30 14:07:24

How to get sum of checkbox data-value which are checked?

<input type="checkbox"  data-value ="5"/>
    <input type="checkbox"  data-value ="15"/>
    <input type="checkbox"  data-value ="19"/>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Gorelov, 2018-03-30
@Kirill-Gorelov

$("input[name='id_tovar']:checked").each(function() {
  //тут считаешь
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question