datatables add class to filters

前端 未结 3 1864
北荒
北荒 2020-12-30 08:03

I am currently seeking a method to add an additional custom class to the jQuery datatables filters (Records per page and Search)

Th

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-30 08:27

    This can also be easily done with jQuery using fnDrawCallback. Here I add two classes to style for Bootstrap

    fnDrawCallback: function( oSettings ) {
    $('div#oTable_length select, div#oTable_filter input').addClass("form-control input-sm");
    },
    

提交回复
热议问题