jQuery Plugin To Sort A List Via Drag and Drop - kpdragsort
File Size: | 4.62 KB |
---|---|
Views Total: | 1163 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |

kpdragsort is an extremely lightweight jQuery plugin which allows you to resort a list of items via drag and drop, without jQuery UI.
How to use it:
1. Include jQuery library and the jQuery kpdragsort plugin on your web page.
<script src="js/jquery-1.11.2.min.js"></script> <script src="js/kpdragsort.js"></script>
2. Create a list of draggable items.
<div class="demo-list" id="demo"> <ul class="list a"></ul> <ul class="list b"></ul> <ul class="list c"></ul> <ul class="list d"></ul> <ul class="list e"></ul> </div>
3. Call the plugin after the list is loaded.
$("#demo").kpdragsort();
4. Call a function when the drag and drop operation is complete.
$("#demo").kpdragsort({ onEnd : function(/**Event*/evt) { // do something } });
Change log:
2016-08-05
- JS update
This awesome jQuery plugin is developed by DoubleRound. For more Advanced Usages, please check the demo page or visit the official website.