How to hide empty header and footer?

How to hide empty header and footer?

blankenhornblankenhorn Posts: 6Questions: 0Answers: 0
edited September 2010 in General
Hi,

i have a small table, that does not display any footer or header info, like pagination, page numbers, serach field etc.

Like this:

[code]

...
...

[/code]

Can anybody tell me how to easily hide the two with the classes

[code][/code]

Help is appreciated,
thx

Replies

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    The easiest option is to simply not have them created. You can do this by setting the sDom parameter: http://datatables.net/usage/options#sDom

    Allan
  • blankenhornblankenhorn Posts: 6Questions: 0Answers: 0
    Hi Allan,


    thx for the quick response.

    I already thought about this possibility, but i really don't figure out how to do it ... can you please give me a quick example?

    Thx Jan
  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Based on the code on the docs page:

    [code]
    $(document).ready(function() {
    $('#example').dataTable( {
    "bJQueryUI": true,
    "sDom": 'lfrtip'
    } );
    } );
    [/code]
    Allan
  • blankenhornblankenhorn Posts: 6Questions: 0Answers: 0
    Thx,


    works perfectly !!

    Once again thumbs up for this really great project !!
  • RuslanRuslan Posts: 4Questions: 0Answers: 0
    Hi.

    How to hide table if it is no matching records found?

    Thanks!
This discussion has been closed.