【发布时间】:2015-12-23 09:55:24
【问题描述】:
我正在自定义分页信息,当 jquery 数据表中有一些数据时它工作正常。但是当表为空时,同样不起作用。
将 sInfo 从“显示_START_to_END_of_TOTAL_条目”自定义为“显示_START_to_END_of_TOTAL_”。
示例代码在这里。 http://jsfiddle.net/inDiscover/d1fg8mrt/
HTML
<table id="myTable">
<thead>
<tr>
<th>Header</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
JS代码
$(document).ready(function(){
var oDTOptions = {};
oDTOptions = {"oLanguage": {"sInfo": "Showing _START_ to _END_ of _TOTAL_"}};
$('#myTable').dataTable(oDTOptions);
});
【问题讨论】:
标签: jquery datatable datatables