I’m trying to implement the danvk draggable table Javascript, and while I’ve been successful using it for tables actually in the html source, when I try to use it with tables I’m creating in Javascript code, it isn’t applied to those tables.
Has anyone had the same issue?
All you need to do is invoke
dragtable.makeDraggable(tableElement);on atabledom node after it has been injected.Consider the following example code:
HTML
JavaScript (the last line here is the crucial one)
Check out a working demo of this code here.