1👍
✅
Try
jQuery(function ($) {
$("#process_button").click(function () {
//create an array of checked checkbox ids
var ids = $('.css-checkbox_latest:checked').map(function (index) {
return this.id;
}).get();
//if nothing is selected alert the user and stop further processing
if (!ids.length) {
alert('nothing is selected')
return;
}
//send a request to server using an ajax POST request, it will contains an array of parameters called ids
$.ajax({
url: '<url>',
type: 'POST',
data: {
ids: ids
}
})
});
});
Source:stackexchange.com