jQuery tablesorter plugin for data grids

I was searching for a new simple jQuery table plugin, only with sorting function. I came across a few. Testing a plugin should happen quickly. The plugin should be thrown out if it is not working even after 15 minutes! I neglected a few those malfunctioned when I tested.  I came across another plugin tablesorter

jquery-datagrid-plugin

Here is how I’ve added my table.

Added the below scripts.

http://code.jquery.com/jquery-2.2.0.min.js
http://code.jquery.com/ui/1.11.0/jquery-ui.js

Made suitable amendments on the following

  1. id
  2. class
  3. added thead and tbody tags


<table id="expenseList" class="tablesorter">
<thead>
<tr>
<th>#</th>
<th>Date</th>
<th>Info</th>
<th>Category</th>
<th>Amount</th>
<th>Currency</th>
</tr>
</thead>
<tbody>
</tbody>
</table>

And finally,


$(document).ready(function() {
$("#expenseList").tablesorter();
alert("finished");
});
</script>

 

clay-horses-31.jpg
(c) https://3monthsinindia.wordpress.com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s