All checkboxes into array
var selected = new Array(); $('#checkboxes input:checked').each(function() { selected.push($(this).attr('name')); });