Buttons with show/hide rows

Buttons with show/hide rows

installmaninstallman Posts: 2Questions: 2Answers: 0

Hello,
I am new in js programming and use datatables for my page.
Actually I use Bootstrap style and was able to add the button in one row with length and search fields.
Now I want to implement the function for the button, where I want to "show/hide disabled" items (rows).
How to implement that?

Here my code snipset:

var table = $('#spending').DataTable({
    "sDom": "<'row'<'col-sm-12 col-md-2'B><'col-sm-12 col-md-2'l><'col-sm-12 col-md-8'f>>" +
        "<'row'<'col-sm-12'tr>>" +
        "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
    buttons: [
        {
            text: 'Show Disabled',
            // what to do here ....
        }
    ],
    lengthMenu: [[25, 50, -1], [25, 50, "All"]],
    stateSave: true,
    select: true
});

...

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.