Can tablesorter do this???
Hi
Have recently started using jQuery and the Tablesorter plugin and am
finding it both interesting and very useful. I have come up against a
problem however and wonder if any of you have ever encountered this
and are aware of any solutions.
I am using Smarty to loop through an array and populate a table as
below. The intention is that for each row of data there is a hidden
row immediately below which will be shown when the 'Show Details' link
is clicked. This click will cause the hidden row to show and get some
data via Ajax which will be appended after the string 'Details:'
The code to do the above is not shown in the extract below but this
all works okay.
The problem I have is that because by default all the hidden rows /
cells contain the same text - 'Details:' - the sorting puts all these
rows together both on inital table load and on subsequent sorts.
I am wondering if there is any way to exclude a row from all Sorting
based on perhaps a class but associate that row with its 'parent' row
(parent being the row immediately above it - which would be based on
the {$Key+1} value below) so that when the parent rows sort the hidden
remains underneath as appropriate.
Hope you can understand what I mean - if you have any thoughts on this
I would be very pleased to hear them - otherwise, thanks for the
plugin - as I said above - it is a very useful extension to jQuery.
Thanks for any help given
CODE SAMPLE:
{foreach key=Key item=Value from=$aTestArray}
<tr id="T1R{$Key+1}">
<td>
{$Value.Name}
</td>
<td>
{Value.Age}
</td>
<td>
<a href='#' class="show_details">Show details</a>
</td>
</tr>
<tr id="T1R{$Key+1}details" style="display: none;">
<td colspan="3">
Details:
</td>
</tr>
{/foreach}