How to change dom button class: 'Bfrtip' from btn btn-secondary to btn btn-primary
How to change dom button class: 'Bfrtip' from btn btn-secondary to btn btn-primary
How to change dom button class: 'Bfrtip' from btn btn-secondary to btn btn-primary?
I use the following dom construction: '<"container"<"row"<"col"B><"col"l><"col"f>>>rtip', while the class of the buttons is btn btn-secondary. If it adds its own class to the button, then the btn btn-secondary class overrides it. The result is:
<button class="btn btn-secondary buttons-collection dropdown-toggle buttons-colvis btn-primary" tabindex="0" aria-controls="productTable" type="button" aria-haspopup="dialog"> <span><i class="fas fa-filter"></i></span><span class="dt-down-arrow"></span></button>
Replies
Use the "init" event handler or the "initComplete" option and change the class using jQuery.
https://datatables.net/reference/event/init
https://datatables.net/reference/option/initComplete