Switching between Responsive and ScrollX with a button?
Switching between Responsive and ScrollX with a button?
MadBoyEvo
Posts: 119Questions: 38Answers: 0
Link to test case: https://jsfiddle.net/5cs0m2b9/
Description of problem:
Is it possible to add a button that when I press it switches between Responsive / ScrollX? I often like Responsive, but sometimes things are too wide and I want to quickly switch to ScrollX
This question has an accepted answers - jump to answer
Answers
You would need to change the Datatables configuration. In order to change the config you will need to use
destroy()
then reinitialize Datatables with the desired configuration options.Kevin
Do you have an example of doing so in more to relation to my example?
I put together a very simplistic example:
http://live.datatables.net/gejoneze/1/edit
Kevin
Thank you!