below is my datatable
When i Selected 2 rows it displays ids
using below code
$("#btn").on("click", function () {
debugger;
var id = $('#myDataTable2 input[type="checkbox"]:checked').map(function () {
return $(this).val();
}).get();
alert(id);
if (id.length === 0) {
swal('', 'Please Select Question', 'warning');
}
});
But When i Clicked To Second Page Using Pagination Then it not Get Ids