An easy way to disable the wrapper alongside info?

An easy way to disable the wrapper alongside info?

MidaIganesMidaIganes Posts: 11Questions: 5Answers: 0
edited January 2021 in Free community support
$('#example').dataTable( {
  "info": false
} );

Will turn it off, but the div remains. (and takes up half the width on screens larger than an ipad, which makes the paging end spill over to a second row in my case)

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

  • colincolin Posts: 15,174Questions: 1Answers: 2,589

    I'm not too clear on what you're trying to achieve, but you could look at dom and remove elements there.

    Colin

  • MidaIganesMidaIganes Posts: 11Questions: 5Answers: 0

    Essentially an empty div is left behind after turning off something like info.
    https://puu.sh/HbP2I/4bfbcde68b.png
    It's getting in the way.

  • kthorngrenkthorngren Posts: 20,400Questions: 26Answers: 4,787
    edited January 2021

    As Colin mentioned you can use the dom option to control the elements placed around the table. See the examples for the standard Bootstrap or BS4 (looks like you are using one of those) setting that you can modify to remove the info element.

    Kevin

  • portosportos Posts: 1Questions: 0Answers: 0

    $('#example tbody').on('click', 'input[type="checkbox"]', function(e){
    $("#details_wrapper").remove();

This discussion has been closed.