JavaScript - - By Sam Deering

jQuery get array of checked checkboxes ids

Use jQuery get array of checked checkboxes ids.

var checkedIds = Array();
$('form:input[type="checkbox"][checked]').each( function(i,v)
{
    checkedIds.push($(v).attr('id'));
});
console.log(checkedIds);
Sponsors
Login or Create Account to Comment
Login Create Account