CheckAll checkbox is working only for first page
CheckAll checkbox is working only for first page
Appreciate your TIMELY, QUICK responses.. When I go to page 4 and click on header's checkbox, it redirects to page 1 and selects all TDs of page 1 only.
DESIRED Functionality: But when I click on page 4, only page 4 records should be checked.
listViewHeader - header checkbox class
listViewData - TD's checkbox class
Datatable -
$('.taskListTable').dataTable({
"scrollCollapse": true,
"bFilter": false,
"paging": true,
"iDisplayLength": 4,
"dom": "Rlfrtip" ,
"initComplete": function(settings, json) {
}
});
$('.taskListTable').parent().children().first().hide();
$('.listViewHeader:checkbox').change(function () {
if($(this).is(":checked")){
$('.listViewData', oTable.rows().nodes()).each(function(){
$(this).prop('checked',true);
});
}else{
$('.listViewData', oTable.rows().nodes()).each(function(){
$(this).prop('checked',false);
});
}
});