1π
β
I would give those boxes a class, something like class='the_checkboxes'
Then use:
$(".the_checkboxes:checkbox:checked").each(function()({
allVals.push($(this).val());
});
It will be cleaner (to me, anyway).
π€Rob L
Source:stackexchange.com