Adding button to table footer

Adding button to table footer

spconwayspconway Posts: 2Questions: 1Answers: 0
edited February 2015 in Free community support

Hi,

I've been looking through examples and other questions that seem similar and I'm still having some trouble getting this right. I have some basic code which you can see below. At first I'm just making my DataTable object and I later add the data dynamically which works the way I want it to. My problem is when I try to use "sDom" when I create my DataTables to add a button to the footer. The button can pretty much go anywhere in the footer. I'm required to use DataTables 1.9.4 so I can't upgrade even if I wanted to

html:

<table id="myTable" class="display" border=0 cellspacing="0px" width="100%">
    <thead>
        <tr>
            <th>Category</th>
        </tr>
    </thead>
</table>

jquery:

var table = $("#myTable").DataTable({
    "bJQueryUI" = true
});

I tried adding an "sDom" but with no luck. I'd like to have something like this somewhere in the footer

<div id="myNewDiv">
    <button id="myNewButton">Test</button>
</div>

Answers

This discussion has been closed.