[英]Jquery Datatables:set the class on the filter input field
如何在datatables插件的'search'字段中設置類。 我也在使用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;
}
有關詳細信息,請參閱數據表樣式部分。
$('div.dataTables_filter input').addClass('form-control');
$('div.dataTables_length select').addClass('form-control');
這里我將Bootstrap類form-control
到過濾器輸入和長度選擇中,作為示例。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.