Closed Hidieh closed 3 years ago
I'm not a javascript expert but maybe try quoting the field names in your data and dropping trailing commas?
Please make sure div
has Id
instead of class
.
Because var table = $('#table-sortable').tableSortable(options);
this is taking element by id
.
If you want to use class then change the selector to .table-sortable
like var table = $('.table-sortable').tableSortable(options);
Getting error "Uncaught TableSortable Violation: tableSortable.element "[object Object]" is not a valid root element" and no table is rendered.
My current code:
table-sortable.js and newest jQuery are correctly in the
and the script is just before And div with "table-sortable" class is on the page I want the table to render.My data can be seen from here (sorry, not stylish but it's rendered via php from mysqli and I think it should work even though it looks ugly?): https://pastebin.com/GNyJ9N9T
I must me missing something cause can't figure out what object is in the root?! My site is a Wordpress site if that helps, can't link since it's still in local development though.