Toggle Custom Button's Class
Toggle Custom Button's Class
fmsolbakken
Posts: 3Questions: 2Answers: 0
I have six custom buttons that toggles visibility om different sets of columns (all different).
I want to toggle a class on each button when pressed so users can easily see which set of columns that are hidden
Is there a way to toggle a custom button's class?
My custom button definition:
{
text: 'Epic',
action: function (e, dt, node, config) {
var columns = oTable.columns('.epic');
columns.visible(!columns.visible()[0]);
}
}
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Perhaps the
buttons().enable()
andbuttons().disable()
methods might do what you are looking for? They are designed for exactly this sort of thing.Allan