Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
21
rated 0 times [  24] [ 3]  / answers: 1 / hits: 65534  / 9 Years ago, tue, august 11, 2015, 12:00:00

I'm using jQuery DataTables and want to copy all rows (save in JavaScript array) upon clicking the header checkbox.



First



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.



enter



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.


More From » jquery

 Answers
12

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.



$('#example').DataTable().rows().iterator('row', function(context, index){
var node = $(this.row(index).node());
//node.context is element of tr generated by jQuery DataTables.
});

[#65456] Saturday, August 8, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
turnerf

Total Points: 620
Total Questions: 101
Total Answers: 109

Location: French Polynesia
Member since Tue, Jul 7, 2020
4 Years ago
turnerf questions
;