Table-dragger is a minimalist plain Javascript library for building reorderable drag-and-drop table. table-dragger.
Features
- Super easy to set up
- cellspacing, cellpadding, col and colgroup in account
- Able to sort columns or rows at the same time
- Smooth animation when sort
- No bloated dependencies
- Touch events
<!-- plugin css file -->
<link rel="stylesheet" href="assets/bundles/tabledragger.min.css">
<!-- Plugin Js -->
<script src="assets/bundles/tabledragger.bundle.js"></script>
<!-- Jquery Page Js -->
<script>
// Default
tableDragger(document.querySelector("#default-table"));
// Handler
tableDragger(document.querySelector("#handle-table"), { dragHandler: ".handle" });
// Sort Rows
tableDragger(document.querySelector("#row-table"), { mode: "row" });
// Free
tableDragger(document.querySelector("#free-table"), { mode: "row", onlyBody: true, dragHandler: ".handle" });
// Only Body
tableDragger(document.querySelector("#only-bodytable"), { mode: "row", onlyBody: true });
</script>