'DataTables make the pagination and display counts appear at the top

When using the DataTables plugin

How would I make the paging and the Showing 1 to 8 of 8 entries appear at the top rather than the bottom?

Thanks



Solution 1:[1]

just add dom property in option as lfrtip to lfript

var dataTable = $('#example').dataTable({
    sPaginationType: "full_numbers",
               dom:"lfrtip"
});,

this will move the info and pagination on the top of the table

see the documentation https://datatables.net/reference/option/dom

Solution 2:[2]

I may be late, but I found the below code more suitable and can be customized based on our needs using the dataTable dom options

$('#example').dataTable( {
  "dom": '<"top"i>rt<"bottom"flp><"clear">'
} );

Reference Link - https://datatables.net/reference/option/dom

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ajmeer sha
Solution 2 Aranyx