Davide Piccolo
asked on
DataTables + iCheck + pagination Issue
iCheck works with datatables only on twenty checkboxes. When I navigate to third and fourth page it shows checkboxes but they don't have iCheck applied. This is code:
And this is the result:
How can I fix the problem?
$(document).ready(function () {
$('#datatable').DataTable(//language options)
});
$("#datatable input[type='checkbox']").iCheck({
checkboxClass: 'icheckbox_flat-green',
//checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_flat-green',
increaseArea: '20%', // optional
disabledClass: 'icheckbox_flat-grey'
});
$("#datatable_paginate a").on('click', RenderiCheckTblBody());
});
function RenderiCheckTblBody() {
return function () {
$("#datatable input[type='checkbox']").iCheck({
checkboxClass: 'icheckbox_flat-green',
//checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_flat-green',
increaseArea: '20%', // optional
disabledClass: 'icheckbox_flat-grey'
});
}
}
And this is the result:
How can I fix the problem?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER