Chnage custom button style
Chnage custom button style
Good afternoon (o;
For shop backend project I place a few custom buttons beside the new/edit/delete buttons to toggle the loaded ajax....didn't find anything related for placing checkboxes side by side to the regular buttons...
Adding a custom class to the button shows no effect as in:
{ text: 'All', className: 'buttons button-active' }
Where "button-active is my own class coloring it with a blue background....
So far I came up with something like this when the button is pressed:
{ text: 'All', className: 'buttons button-active', action: function( e, dt, node, config ) {
node[0].style.backgroundColor = "blue";
node[0].style.color = "white";
}
},
But of course this gets only triggered when pressed...is there a button API call which is run when the buttons are initialized?
thanks in advance
richard
Answers
Okay...found it...easy peasy (o;
Thanks for the update - good to hear you found a solution.
For something a bit more modular, the
buttons.buttons.init
option for the button definition is probably a better way to do it.Allan