Mobile-friendly Drag & Drop Sorting Plugin For jQuery - Sorter

Mobile-friendly Drag & Drop Sorting Plugin For jQuery - Sorter
File Size: 8.33 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Sorter is a lightweight, cross-browser and cross-platform jQuery plugin which allows drag and drop to resort a hierarchical html list. Supports both mouse drag & move and mobile touch events. 

How to use it:

1. Load the necessary jQuery JavaScript library in the html page.

<script src="//code.jquery.com/jquery-1.12.4.min.js"></script>

2. Load the jQuery Mobile library if you want to enable touch events on mobile devices.

<script src="jquery.mobile.min.js"></script>

3. Download and load the jQuery Sorter's files in the page.

<link rel="stylesheet" href="css/amigo.sorter.css">
<script src="js/amigo.sorter-1.0.js"></script>

4. Add the CSS class 'sorter' to your html list.

<ul class="sorter">
  ..
</ul>

4. If you want to create nested sortable html list:

<ul class="sorter">
  <li>
    <ul class="sorter">
      ...
    </ul>
  </li>
</ul>

5. Call the function and the plugin will take care of the rest.

$('ul.sorter').amigoSorter();

This awesome jQuery plugin is developed by amigodev. For more Advanced Usages, please check the demo page or visit the official website.