Trying to add button dynamically, doing something wrong :(
Trying to add button dynamically, doing something wrong :(
https://jsfiddle.net/w0vpn36y/
No error messages shown
I want to dynamically add buttons and am not having any luck. I've attached the JSFiddle, I thought I did everything as shown in the examples but it just ignores the button.add task
This question has an accepted answers - jump to answer
Answers
You are using this to init Datatables:
The variable
dtab
doesn't contain the Datatable API instance needed for adding the button. See this FAQ. Use an upper caseD
, like this:Updated example:
https://jsfiddle.net/myafc10x/
Kevin
O.M.G. I seriously don't know if I ever would have caught that. Thanks so much!!