Custom buttons not showing
Custom buttons not showing
sarahk
Posts: 2Questions: 1Answers: 0
I'm keen to ditch my non-datatables buttons and use yours instead. I'm using the cdn with javascript: buttons and buttons.print.
I've got an example at http://live.datatables.net/yaruhewo/1/edit
I've uploaded by actual config using the debug tool: ojayar
My code looks like this:
$(document).ready(function () {
$('#tMerges').DataTable({
processing: true,
serverSide: true,
stateSave: true,
order: [[ 0, "desc" ]],
buttons: [{
text: 'Reload',
action: function (e, dt, node, config) {
dt.ajax.reload();
}
}],
ajax: { url: "/merges/jsonIndex.json" }
});
});
What am I missing?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You need to add code to tell Datatables where to display the buttons. See the Installation docs for details. Usually the
dom
option is the easiest.Kevin