Line to toggle the visibility of columns not shown (Example: Show / hide columns dynamically)
Line to toggle the visibility of columns not shown (Example: Show / hide columns dynamically)
I'm new to jQuery and Datatables at all. I set up some tests with my own data and code almoust successfully.
At least I wanted to add the 'Show / hide columns dynamically' feature as described in the examples section (https://datatables.net/examples/api/show_hide.html) without success. Just to check what's going wrong I reduced my own code step by step to come to an exact copy of the example at least. But it is still not working.
I set up a fiddle at https://jsfiddle.net/jcTom/h9rygqL6/2/ where it is not functional as well!
Could anyone please have a look at it and tell me what I'm doing wrong?
Kind Regards
Tom
This question has an accepted answers - jump to answer
Answers
Hi,
I think the issue is just that the links the Javascript attaches itself to haven't been included: https://jsfiddle.net/h9rygqL6/5/ .
Another option would be to use the
colvis
button option: example.Allan
Thank you Allan for the fast response!
Please add the HTML code to create the links in the Example page at https://datatables.net/examples/api/show_hide.html.
Because it is not included there at the moment, I got the impression the links would be created by DataTables package itself!
Kind Regards
Tom