// limit the number of selected checkboxes
$("input:checkbox").click(function(){
if ($("input:checkbox:checked").length > 3){
return false;
}
});
// http://stackoverflow.com/questions/19001844/how-to-limit-the-number-of-selected-checkboxes