Buttons on right side versus on top

Buttons on right side versus on top

pricejtpricejt Posts: 12Questions: 5Answers: 1

In all of the table tool examples the buttons (copy, pdf, excel..) are on the top above the search control. However when I build this using the same files in the example my buttons go to the far right next to the search box. See this JSFiddle.
http://jsfiddle.net/pricejt/eaLedcx4/

Anyone tell me why this is happening.

Answers

  • brandonzbrandonz Posts: 1Questions: 0Answers: 0
    edited July 2015

    The dom function did the same for me, but this worked.

    $(document).ready(function() { var table = $('#example').DataTable(); var tt = new $.fn.dataTable.TableTools( table ); $( tt.fnContainer() ).insertBefore('div.dataTables_wrapper'); } );

  • allanallan Posts: 48,908Questions: 1Answers: 7,133 Site admin

    They are on top in your example because of DataTables' responsive CSS and the fact that the JSFiddle output is very narrow.

    If you view it full page you will see they are on the right.

    Allan

This discussion has been closed.