Search code examples
jquerypaginationdatatablesyadcf

datatables pagination number show


I want to add pagination by numbers not previous & next only button , I don't know where is the problem it's cdn or code in jquery here is i work on it ,i want the pagination to be like the simple_numbers pagination

<https://www.codepen.io/HusseinZaki/pen/ddLwwq>?

Solution

  • Looks like the datatables version you are using is not supporting paging properly.

    changed datatables cdn to https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js (at this time of writing this answer, this is the cdn provided by datatables)

    and changed your datatable line to $('#data').dataTable({"pagingType": "full_numbers"})

    Give it a try.