Add / Remove Class

Add / Remove Class

baris.ozdemirbaris.ozdemir Posts: 1Questions: 0Answers: 0
edited May 2017 in Free community support

Hi guys,
Thank you for that;
How can I add and remove classes using only the options ?
Because I use more than one datatable in a page.
I want to give the styles of the tables separately.

e.g I want to make this code using options.
$('.paginate_button').removeClass('paginate_button').addClass('btn btn-success').css('margin-right','5px');
$('.current').removeClass('current').addClass('active');
$('.dt-buttons a').removeClass().addClass('btn btn-success').css('margin-right', '5px');

Replies

  • allanallan Posts: 63,889Questions: 1Answers: 10,530 Site admin

    Currently there isn't a public API for that, sorry. The classes are effectively shared between all tables.

    Allan

This discussion has been closed.