Created
March 26, 2014 15:54
-
-
Save emamut/9786592 to your computer and use it in GitHub Desktop.
Getting all selected checkboxes in an array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#process').on('click', function(){ | |
var checkboxs_checked = []; | |
$("input:checkbox:checked").each(function() { | |
checkboxs_checked.push($(this).val()); | |
}); | |
console.log(checkboxs_checked); | |
if(checkboxs_checked.length == 0) | |
alert('Seleccione al menos una hora extra para procesar!'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment