我正在寻找帮助 jquery 数据表标题和列宽度大小不匹配。我的意思是列大小根据文本长度(数据表值)而变化。如何修复列应该是标准宽度并与故事标题匹配。
另一个问题是分页。我正在寻找分页样式,例如分页示例,但我的表格中没有相同的样式。请帮助我。
另一个请求将给出示例(主题 redmond)的相同主题应用于数据表。
请在 jsfiddle JSFIDDLE中找到以下我的数据表
$("#products1").dataTable({
"aaData": newarray,
"bProcessing": true,
"bDeferRender": true,
"bFilter": false,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bRetrieve": true,
"bPaginate": true,
"bSort": true,
"aaSorting": [[4, "desc"]],
"iDisplayLength": 5,
"oLanguage":{
"sInfo":"_START_-_END_ of _TOTAL_",
"oPaginate":{
"sFirst": "<<",
"sLast": ">>",
"sNext": ">",
"sPrevious": "<"
},
"sLengthMenu":"Show _MENU_"
},
"aoColumns": [{"sWidth": "100%","sClass": "center","bSortable": false},
{
"sWidth": "150%","sClass": "center","bSortable": false},
{
"sWidth": "150%","sClass": "center","bSortable": false},
{
"sWidth": "150%","sClass": "center","bSortable": false}
],
"aoColumnDefs": [{ "fnRender": function (o, val) {
return o.aData[0];
},
"sClass": "HEADER","aTargets": [0]
}, {
"fnRender": function (o, val) {
return o.aData[1];
},
"sClass": "list","aTargets": [1]
}, {
"fnRender": function (o, val) {
return o.aData[2];
},
"sClass": " Number","aTargets": [2]
},{
"fnRender": function (o, val) {
return o.aData[3];
},
"sClass": "Name","aTargets": [3]
}]
});