Newbie: trying to get buttons to work using layout rather than dom.
Newbie: trying to get buttons to work using layout rather than dom.
Hi,
Fairly new to web page programming so forgive my ignorance. I managed to cobble together a working implementation of datatables with buttons a few years ago to show/hide columns and now am trying to upgrade to the latest version. I can no longer get the buttons to show when moving from dom: 'Blfrtip' to layout:. Been playing around in the live environment but having no luck getting it going in there - can anyone see what I'm doing wrong? (I assume the buttons should still show even if they perform no function?)
https://live.datatables.net/wulivadu/1/edit
Thanks
This question has an accepted answers - jump to answer
Answers
Take a look at the browser's console to see the error thrown:
You have the wrong syntax. You have this:
It should look like this:
Updated exampel:
https://live.datatables.net/wulivadu/2/edit
Kevin
Thanks for that. Duh. I did go back and paste in the example properly.
Is there any way to have the buttons on top, and then have the pageLength immediately below them, as now it no longer appears?
(The dark theme doesn't apply properly and the "paging" element is all awry but that currently works in my main site so I won't worry about that for now in this test)
.
Just change your layout to this: