[英]FixedHead in datatables doesn't work after removing pagination
When I delete the line “paginate”: false inside of the javascript box, the Fixedheader doesn't work anymore but I don't want pagination. 当我在JavaScript框内删除“ paginate”:false行时,Fixedheader不再起作用,但我不希望出现分页。 Is there any way to avoid this?
有什么办法可以避免这种情况?
Here's the code: http://jsfiddle.net/xF8hZ/128/ 这是代码: http : //jsfiddle.net/xF8hZ/128/
$(document).ready(function() {
var table = $('#example').DataTable( {
"bSort": false
"paginate": false
} );
new $.fn.dataTable.FixedHeader( table, { "left": true } );
$('.filterName').on('click', function(e) {
e.preventDefault();
var filterValue = $(this).data('filter');
table.column(0).data().search(filterValue).draw();
});
} );
I assume you meant to say 我想你是想说
When I put the line “paginate”: false inside of the javascript box...
当我将 “ paginate”行:javascript框内为false时...
That's because you missed a comma there, should look like this: 那是因为您错过了一个逗号,应该看起来像这样:
$(document).ready(function() {
var table = $('#example').DataTable( {
"bSort": false,
"paginate": false
} );
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.