How to set the active state when a button is clicked in the "column groups" example?
How to set the active state when a button is clicked in the "column groups" example?
I would like to set the active state when a button is clicked in the Column Groups example, and unset the active state for the other buttons. I have created a JSFiddle with my attempt to solve the problem. Unfortunately my code seems to toggle all the buttons, instead of only the one I click. If one button is clicked twice, the active state is deselected when it should remain selected.
Thanks
This discussion has been closed.
Answers
bilyejd, everything in your code is right, except, that the true and false within the dTable.button(0).active('true'); has to be written without '-sign, i.e. dTable.button(0).active(true); once you remove the '-sign, everything works fine.