Global JS Variable best way to retieve datatables?

Global JS Variable best way to retieve datatables?

EricEric Posts: 24Questions: 0Answers: 0
edited June 2011 in General
I've have DataTables deeply integrated into my web application now. I just realized that I am hitting the the 4k cookie limit and need to rewrite some code.

On one page I have multiple datatables (6-9 or more) and am using state saving. Each of these tables pretty much have the same characteristics across projects, and I was hoping to state save all of them individually but neglected to consider cookie limit.

Now I'm thinking of creating the datatables by class (i.e., $('.itemType').datatable();) I wrote my own hide/show column feature (not the colvis plugin) that is per datatable instance by id (i.e., $('#...') and will now have to change that. I'm not sure the best way to retrieve the ones I initialize by class now.

If I initialize multiple datatables by class, what is the best way to retrieve just one of them?

Replies

  • EricEric Posts: 24Questions: 0Answers: 0
    Sorry, after searching more I discovered $.fn.dataTableExt.iApiIndex and I will look into that now.
This discussion has been closed.