why is the 'btn-primary' color not applied for datatables buttons?
why is the 'btn-primary' color not applied for datatables buttons?
![holstyBoy](https://secure.gravatar.com/avatar/03fc05b40b0bbacb7d6ca7b3e0d5961c/?default=https%3A%2F%2Fvanillicon.com%2F03fc05b40b0bbacb7d6ca7b3e0d5961c_200.png&rating=g&size=120)
hi team,
i stumbled across the following phenomenon:
by applying the className: 'btn btn-xxxxxx', i.e.
extend: 'selectedSingle',
className: 'btn btn-warning',
text: 'bearbeiten',
action: function (e, dt, node, config) {
editContact(dt);
}
}
datatables is changing the button color to all available bootstrap button colors BUT btn-primary! if i define 'btn btn-primary' the buttons stay in the datatables defaultt color: grey.
btw, this phenomenon applies also to the datatables 'csv, pdf, excel' buttons
am i doing something wrong or is it expected default behaviour?
cheers
tomek
This question has an accepted answers - jump to answer
Answers
It has
btn-secondary
as a default, so that is overriding yourprimary
.Do:
Example: https://live.datatables.net/guforosa/1/edit .
Allan
hi allan,
works like a charme!
thank you, very much appreciated.
cheers
toemk