Create Sortable HTML Tables In jQuery - sortable.js

File Size: 10 KB
Views Total: 10867
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Create Sortable HTML Tables In jQuery - sortable.js

sortable.js is a lightweight jQuery plugin that provides a 'sortable' functionality to your table columns with support for fixed table header and column highlighting.

How to use it:

1. Include jQuery library together with the stylesheet sortable.css and JavaScript sortable.js on the webpage.

<link href="sortable.css" rel="stylesheet">
<script src="//"></script>
<script src="sortable.js"></script>

2. Call the plugin on the html table and done.

  // options here

3. Config the plugin with the following options.


  // DIV selector before table
  divBeforeTable: '',

  // DIV selector after table
  divAfterTable: '',

  // initial sortable column
  initialSort: '',

  // ascending or descending order
  initialSortDesc: false,

  // language
  locale: 'en',

  // column(s) with negative values
  negativeSort: [],

  // use table array
  tableArray : []

Change log:


  • Update sortable.js


  • Update sortable.css


  • Update sortable.js


  • JS update


  • JS update

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