How to sort a list using the sortable.js library? https://sortablejs.github.io/Sortable/
I set sortable_container(sortable_employees id) on the tr attribute. This works great. But how to sort td in tbody at the same time?
Please see gif. Tbody is not sortable. How to create a table to drag and drop header cells and body cells. Or how can I set up sortable.js to do this for me?
Check the sample code:
const el = document.getElementById('sortable_employees'); const sortable = new Sortable(el, { animation: 150, ghostClass: 'bg-blue-200', });
https://jsfiddle.net/mateuszbialowas/ds5bfj7v/27/
You can try this div method.
https://codepen.io/jlapinski/pen/ZXYERN