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


Aakash MauryaRank #114 · 19.8K reputationPosted Jul 3, 2018, 3:25 AM EDT
Ravi Polara PatidarRank #2,471 · 568 reputationPosted Jul 3, 2018, 3:02 AM EDT
Mohit KalaRank #948 · 2.2K reputationPosted Jul 4, 2018, 2:04 AM EDT
Siddharth Kushwah5 reputationPosted Jan 21, 2020, 12:50 PM EST