Animated Table Sorting Plugin For jQuery

File Size: 7.74KB
Views Total: 7278
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Animated Table Sorting Plugin For jQuery

A simple and easy-to-use jQuery plugin that makes your HTML table sortable with an animated sorting effect.  Click on any of the table headers will see this plugin in action.

How to use it:

1.  Include jQuery Library and tsort.js

<script src=""></script>
<script src="tsort.min.js"></script>

2. Markup

<table width="100%" class="tableSorter">
	<th width="32">Year</th>
	<th width="220">Film</th>
	<th width="102">Credit Role</th>
	<th width="88">Grossed</th>
	<th width="63">IMDB</th>
	<th width="98">Rotten Tomatoes</th>
	<td>Annie Hall</td>
	<td>Alvy Singer</td>


3. Call the plugin

<script type="text/javascript">
$(document).ready(function() {

$('table').tableSort( {
animation :'slide',
} );

4. Add sort arrows to your table's header

table.tableSorter th div.sortArrow {
	width: 11px;
	height: 6px;
	display: inline-block;
	margin-left: 5px;
	vertical-align: 2px;
	position: relative;

table.tableSorter th div.sortArrow div.sortArrowAscending,
table.tableSorter th div.sortArrow div.sortArrowDescending {
	position: absolute;
	display: none;
	width: 11px;
	height: 6px;

table.tableSorter th div.sortArrow div.sortArrowAscending {
	background: url('arrow_asc.png') no-repeat;

table.tableSorter th div.sortArrow div.sortArrowDescending {
	background: url('arrow_desc.png') no-repeat;

Change Log:

v0.2.2 (2013-02-26)

  • Added a fix for IE8.
  • Added Global Sort As documentation.
  • Added known issues section.

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