Is there an api method for updating button options? I’m looking at classname and title currently but could see cases for any. Basically want to be able to update when certain events happen and not seeing a method in the documentation.
This question has accepted answers - jump to:
You can use button().node() to get the node then use jQuery to update the classname or title.
button().node()
Kevin
Can I do the text of the button from there too? I always mix up title and text in my head and that’s what I meant.
All of the button API's can be found here: https://datatables.net/reference/api/#buttons
Specifically you will want to use button().text().
button().text()
It looks like you're new here. If you want to get involved, click one of these buttons!
Answers
You can use
button().node()
to get the node then use jQuery to update the classname or title.Kevin
Can I do the text of the button from there too? I always mix up title and text in my head and that’s what I meant.
All of the button API's can be found here:
https://datatables.net/reference/api/#buttons
Specifically you will want to use
button().text()
.Kevin