One problem seems to be that you don't have any event that runs when you change the checkbox.
I've made a small example, that will show how this can be done given the code you provided.
$(".admin__control-checkbox").change(function() {
var values = new Array();
$(".admin__control-checkbox:checked").each(function() {
var v = $(this).closest("tr").find(':input[type="number"]').val() || 0
values.push(v)
});
alert("val---" + values.join(", "));
})
Demo
$(".admin__control-checkbox").change(function() {
var values = new Array();
$(".admin__control-checkbox:checked").each(function() {
var v = $(this).closest("tr").find(':input[type="number"]').val() || 0
values.push(v)
});
alert("val---" + values.join(", "));
})
test | ||
test | ||
test |