I'm using jQuery DataTables and want to copy all rows (save in JavaScript array) upon clicking the header checkbox.
I want to find where jQuery DataTables store the HTML for remaining page of rows, so I can navigate through JavaScript then check it there or set property checked to true.
Something like this one.
Other information:
- I use data from an ajax source(
serverside:false
), all data is returned. - When I click page 1, all the rows remain Checked.
use tableObject.rows().data() will return all data of table.
There are many methods that could be used for that purpose. You can use
rows().data()
to get the data for the selected rows.Example:
See this jsFiddle for code and demonstration.
I find the generated element by jQuery DataTables using this code, and I can copy the whole
tr
element that hides when paging the DataTables.