buttons().container().appendTo does not work when using language.url
buttons().container().appendTo does not work when using language.url
berndy2001
Posts: 7Questions: 2Answers: 0
I want to move the buttons into a custom div, for this I have used oTable.buttons().container().appendTo($('#myButtons'));
. Unfortunately it did not work. By testing I found out that it is because of language.url
.
Example (see the position of the excel-Button):
not working: http://live.datatables.net/zasasuxa/3/edit
working: http://live.datatables.net/winisefu/5/edit
What is the correct way to use both?
Thank you!
This question has an accepted answers - jump to answer
Answers
It's because of the Ajax nature of the language URL : you can move it into
initComplete
like this: http://live.datatables.net/zasasuxa/3/editThis thread here also discusses that,
Colin
Hello Colin,
Thanks for your answer. I managed to do this with
initComplete
, but of course the button now appears after other buttons (which are custom buttons).Since I don't like that optically, I have now solved it with another button which triggers the excel-button