jQuery plugin: Tablesorter 2.0

Permalink 2 users found helpful
Since the Tablesorter plugin doesn't work with the current version of C5, what would be the best way to incorporate the functionality of the Tablesort jQuery plugin? As I was told be another person, the reason the C5 TableSorter Plugin doesn't work is most likely because it calls jQuery again, even though C5 now calls it by default. What would be the best way to over come this? Thanks!

Blenderite
 
Remo replied on at Permalink Reply
Remo
Do you have an example where we can reproduce this problem? I've got a few cases where I'm working with tablesorter and it still works fine..
mhawke replied on at Permalink Reply
mhawke
I can confirm that I have TableSorter working in 5.6.1.2 without issues.
JohntheFish replied on at Permalink Reply
JohntheFish
I also have tablesorter working within a number of my addons. I have been using version 2.0.5b.
Blenderite replied on at Permalink Reply
Blenderite
JohntheFish replied on at Permalink Reply
JohntheFish
The post you refer to seems to be rooted in a problem with an old concrete5 addon, and not with the jQuery plugin it uses.
Blenderite replied on at Permalink Reply
Blenderite
How would I use the tablesorter.js file since I can't edit the head of the homepage?
mhawke replied on at Permalink Best Answer Reply
mhawke
I just threw up the free TableSorter temporarily on a server running 5.6.1.2. It works.

I added an HTML block and put this code in it:
<style>
.tablesorter td,th{width:20%;padding:3px;border:1px solid #000;text-align:center}
.tablesorter th{background:#ccc}
</style>
<table id="myTable" class="tablesorter"> 
<thead> 
<tr> 
    <th>Last Name</th> 
    <th>First Name</th> 
    <th>Email</th> 
    <th>Due</th> 
    <th>Web Site</th> 
</tr> 
</thead> 
<tbody>


I then added the free TableSorter add-on and specified #myTable for the add-on.
Blenderite replied on at Permalink Reply
Blenderite
What if I wanted to add some of the extra features that the TableSorter can support? Where would I put the JS for that?
mhawke replied on at Permalink Reply
mhawke
I think you can add the options you want by simply editing the 'engaging.js' file located in the '[root]/packages/engagingit_table_sorter/blocks/engagingit_table_sorter/js/engaging.js'

You can specify the options by changing the line that initiates tablesorter here:
$(classname).tablesorter(options go here);


The options are spelled out here:

http://tablesorter.com/docs/#Configuration...
Blenderite replied on at Permalink Reply
Blenderite
I was thinking more along the lines of the stuff listed under Download and then Options/Addons. I was wanting to add the jquery.tablesorter.pager.js plugin and things like that. Where would I put the JS file?