如何在数据表插件的“搜索”字段上设置类。我也在使用 Jquery UI 主题。
$('#idSmovData').dataTable( {
"sScrollY": "600px"
,"bPaginate": false
,"bFilter": true
,"bJQueryUI": true
,"bInfo": false
,"bSort": false
});
最佳答案
您可以使用oStdClasses
设置搜索过滤器包装div样式类
$.fn.dataTableExt.oStdClasses["sFilter"] = "my-style-class";
然后使用常规 CSS 来定位搜索输入字段:
.my-style-class input[type=text] {
color: green;
}
请引用datatables styling部分了解更多详细信息。
关于Jquery数据表:set the class on the filter input field,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9486954/