This time I will share jQuery Plugin and tutorial about Simplest Drag To Sort Plugin For jQuery – drag-sort, hope it will help you in programming stack.
The simplest jQuery drag to sort plugin which enables the drag’n’drop re-sort functionality on the list view. Without any 3rd dependencies such as jQuery UI.
How to use it:
1. Create a normal html list as this:
01 |
< ul id = "wrap" class = "wrap" > |
2. Download and include the drag-sort.js
script along with the latest jQuery library at the bottom of the webpage.
1 |
< script src = "//code.jquery.com/jquery.min.js" ></ script > |
2 |
< script src = "drag-sort.js" ></ script > |
3. Call the function on the html list to enable the drag to sort functionality.
4. Customize the default CSS styles while dragging and sorting.
03 |
'background-color' : '#f9f9f9' , |
04 |
'border' : '1px dashed #ddd' |
08 |
'box-shadow' : '10px 10px 20px 0 #eee' |
This awesome jQuery plugin is developed by ylb1992. For more Advanced Usages, please check the demo page or visit the official website.