I have table that looks like this:
As you can see there are checkboxes next to users whose values I need to catch if they are checked. And I did it with this code before there were not enough users for pagination to work:
var cbChecked = new Array();
$("input[type='checkbox']:checked").each(function () {
cbChecked[cbChecked.length] = this.value;
});
But since I'm using DataTables
plugin, and pagination splits users, jQuery is only able to see those checkboxes that are displayed on current page, even though I have two more users checked on page 2 of my table. When I inspected page I see that in DOM there are really only these people displayed, others are not even hidden. Any suggestion what to do to catch all checked checkboxes in my table?
Aucun commentaire:
Enregistrer un commentaire