I'm getting the following syntax error for my list of check boxes:
unrecognized expression: input:checked[name=match_list[]]
HTML:
<label class="checkbox">
<input type="checkbox" name="match_list[]" value="10">
Item 10
</label>
<label class="checkbox">
<input type="checkbox" name="match_list[]" value="20">
Item 20
</label>
jQuery:
var arr=[];
$('input:checked[name=match_list[]]').each(function(){
arr.push($(this).val());
});
Any idea what the error is pointing to? The syntax looks fine to me...
foror nest the input inside a label.. they both work and are valid.