Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Datatables DOM positioning

Is there any more documentation about DOM positioning other than here? https://www.datatables.net/examples/basic_init/dom.html

For example, I want to position the entries select field & the entries info under the pagination. How would I achieve this?

This is what I got so far:

$("#relations-table").dataTable({
    "order": [[ 1, "desc" ]],
    columnDefs: [ { "orderable": false, "targets": [0] } ],
    //pageLength: 50
    "dom": '<"top"rf>t<"bottom"pli>'
});

$(".dataTables_length").css({ "margin-top": "-35px" });
like image 666
Koeno Avatar asked Dec 14 '22 07:12

Koeno


1 Answers

Found the solution:

 dom:
    "<'row'<'col-sm-6'B><'col-sm-6'f>>" +
    "<'row'<'col-sm-12'tr>>" +
    "<'row'<'col-sm-4'i><'col-sm-4 text-center'l><'col-sm-4'p>>",
like image 174
Koeno Avatar answered Dec 26 '22 17:12

Koeno