select all input:checked code example
Example 1: jquery selector checked
$("input:checked")
Example 2: jquery get selected checkboxes
var selected = [];
$('#checkboxes input:checked').each(function() {
selected.push($(this).attr('name'));
});