"Showing 1 to 10 of 20 entries" when there are more than 20 entries
"Showing 1 to 10 of 20 entries" when there are more than 20 entries
lesley
Posts: 1Questions: 1Answers: 0
Description of problem:
I am using the below code to have the datatable working in my website. But however, when I am trying to load the table, It only shows "Showing 1 to 10 of 20 entries" at the bottom left when there are more than 20 entries. Could anyone please help me with that please? Thank you.
<?php
echo $this->Html->css('//cdn.datatables.net/1.10.24/css/jquery.dataTables.min.css',['block'=>true]);
echo $this->Html->script('//cdn.datatables.net/1.10.24/js/jquery.dataTables.min.js',['block'=>true]);?>
<script>
$(document).ready(function() {
$('#myTable').DataTable(
);
});
</script>
Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide
This discussion has been closed.
Answers
Looks like your table is sourced from the DOM. Make sure the table has a proper HTML structure. You can use the w3c validator for that. Also make sure the table meets the Datatables HTML requirements. If you still need help please post a link to your page or a test case replicating the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin