我可以更改dataTables中搜索文本字段的宽度吗?
我正在编写以下代码,但它无效.
$('#example').dataTable() .columnFilter({ sPlaceHolder: "head:before",aoColumns: [ { type: "text",width:"10px" },{ type: "date-range" },{ type: "date-range" } ] });
如果我的dataTables是动态生成的,如下面的gven:
$('#example').dataTable({ "aaData": aDataSet,"aoColumns": [ { "sTitle": "#","sWidth": "10px" },{ "sTitle": "ID" },{ "sTitle": "Staff Name" },{ "sTitle": "Rig Days" },{ "sTitle": "Manager"},{ "sTitle": "Grade"},{ "sTitle": "Tools"},{ "sTitle": "Vacations"},{ "sTitle": "Presently On"},] }); }