Hiding search and lengthChange leaves empty divs behind

Hiding search and lengthChange leaves empty divs behind

FlyingPigFlyingPig Posts: 2Questions: 1Answers: 0

Hi,

I have the problem that when I set elements to false:

$.extend($.fn.dataTable.defaults, {
searching: false,
lengthChange: false
});

Then there are still empty divs being created:

Those are the divs that are the containers for search and lengthchange. They are now filling up empty space in height, which makes it ugly. Does anyone know if there is a solution for this?

Thanks, Asa

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @FlyingPig ,

    If you want to hide those elements it's best to use dom - here you can customise which elements get displayed.

    Cheers,

    Colin

  • FlyingPigFlyingPig Posts: 2Questions: 1Answers: 0

    Hi Colin,

    Big thanks for your answer. exactly what I was looking for :)

This discussion has been closed.