I have tried to do a test:
var test = Array();
$('input[name=first_category[]]:checked').each(function()
{
test.push($(this).val());
});
alert(test);
- Check the last checkbox.
- Refresh the page.
- Alert should be empty (but is not empty, it shows me 4).
I have 5 categories and each category contains more than 10 checkboxes.