Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

show [] entries datatable change position

I am using jQuery Datatables with Show[] entries at the top of the table. However, I would like to move it to the bottom.

Below is my jQuery code:

$(document).ready(function() {
  $('#ple').dataTable({
    "dom": '<"pull-left"f><"pull-bottom"l>tip'
  });
});
like image 203
Otmane Avatar asked Oct 29 '22 22:10

Otmane


1 Answers

From "https://datatables.net/examples/basic_init/dom.html" =>

l - Length changing
f - Filtering input
t - The Table!
i - Information
p - Pagination
r - pRocessing
< and > - div elements
<"#id" and > - div with an id
<"class" and > - div with a class
<"#id.class" and > - div with an id and class

Here is the code that I used;

$('table.tableClass').DataTable({
    "dom": '<"top"f>rt<"bottom"lp><"clear">'
  });

ps: (I don't use "i" : info, So if you need "i" add somewhere you desire);

ps2 : ('table.tableClass') is also taking care of multiple tables. You can use ('#tableID') for one table.

like image 113
ikinciadam Avatar answered Nov 15 '22 12:11

ikinciadam