xxxxxxxxxx
$("#merge_button").click(function(event){
event.preventDefault();
var searchIDs = $("#find-table input:checkbox:checked").map(function(){
return $(this).val();
}).get(); // <----
console.log(searchIDs);
});
xxxxxxxxxx
$('#checkbox_id:checked').val();
//if checkbox is selected than gets its value
xxxxxxxxxx
let weekdays = $('input[name="weekday"]:checked').map(function () {
return $(this).val()
}).get()
xxxxxxxxxx
$("#submit").click(function(event){
event.preventDefault();
var value = $("#id_name_div input:checkbox:checked").map(function(){
return $(this).val();
}).get();
console.log(value);
});
xxxxxxxxxx
$('input[name="checkboxGroup"]:checked'); // returns checked input objects
jquery get selected checkbox values
xxxxxxxxxx
var selectedLanguage = new Array();
$('input[name="language"]:checked').each(function() {
selectedLanguage.push(this.value);
});