More than one tables on page and getting the reference to first table
More than one tables on page and getting the reference to first table
mahinkhan
Posts: 4Questions: 2Answers: 0
http://jsfiddle.net/mahinkhan/Lz17rdme/
When I try to refresh the table I don't get correct url. So I get the question:
is this not the right way to get a reference to the first table?
$($('table.dataTable')[0]).DataTable().ajax.reload(null, false);
It appears that as the function is looping through tables and initializing them it corrupts the 'url' value of previous tables and reference to only last table remains intact.
I tried saving the reference of each table in an array that also didn't work
This discussion has been closed.
Answers
I found out the issue. It was because my tables' html was generated dynamically and they had the same IDs
Thanks for posting back - good to hear you've got a solution!
Allan