Tablesorter doesn't support that. You could do it as separate tables with no
gaps between them... but that's as close as you'll get. If you need linked
sorting, e.g. clicking the header of one table sorts all tables, you'll need
something like this:

<script type='text/javascript' language='JavaScript'>
$(document).ready( function(){
  $("table.tablesorter").tablesorter();
  var $multisort = $("table.multisort");
  $multisort.addClass( "multisort_unsorted" );
  $multisort.bind( "sortStart", function(){
    $(this).removeClass( "multisort_unsorted" );
    });
  $multisort.filter( ".multisort_unsorted" ).bind( "sortEnd", function(){
    var sortOrder = [ this.config.sortList ]; // get sort order
    $multisort.filter( ".multisort_unsorted" ).removeClass(
"multisort_unsorted" ).trigger( "sorton", sortOrder );
    setTimeout( function(){ $multisort.addClass( "multisort_unsortedd" ); },
0 ); // avoid retriggering
    });
  });
</script>
</head>
<body>
<table class="tablesorter multisort">
  <thead>
    <tr>
      <th>col 1</th>
      <th>col 2</th>
      <th>col 3</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>10</td>
      <td>beef</td>
    </tr>
    <tr>
      <td>1</td>
      <td>6</td>
      <td>sausage</td>
    </tr>
    <tr>
      <td>-3</td>
      <td>12</td>
      <td>ham</td>
    </tr>
    <tr>
      <td>-3</td>
      <td>6</td>
      <td>beef</td>
    </tr>
    <tr>
      <td>4</td>
      <td>7</td>
      <td>pork</td>
    </tr>
    <tr>
      <td>4</td>
      <td>7</td>
      <td>beef</td>
    </tr>
  </tbody>
</table>
<table class="tablesorter multisort">
  <thead>
    <tr>
      <th>col 1</th>
      <th>col 2</th>
      <th>col 3</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>11</td>
      <td>4</td>
      <td>pork</td>
    </tr>
    <tr>
      <td>12</td>
      <td>3</td>
      <td>ham</td>
    </tr>
    <tr>
      <td>10</td>
      <td>1</td>
      <td>sausage</td>
    </tr>
    <tr>
      <td>4</td>
      <td>7</td>
      <td>pork</td>
    </tr>
  </tbody>
</table>
<table class="tablesorter multisort">
  <thead>
    <tr>
      <th>col 1</th>
      <th>col 2</th>
      <th>col 3</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>7</td>
      <td>-2</td>
      <td>turkey</td>
    </tr>
    <tr>
      <td>4</td>
      <td>7</td>
      <td>pork</td>
    </tr>
    <tr>
      <td>20</td>
      <td>-10</td>
      <td>beef</td>
    </tr>
    <tr>
      <td>17</td>
      <td>6</td>
      <td>fish</td>
    </tr>
  </tbody>
</table>



On Tue, Aug 4, 2009 at 11:57, Crazy Serb <crazys...@gmail.com> wrote:

>
> In using Tablesorter plugin, I have run into an challenging issue.
>
> What I am looking to do is group certain rows in a single table into
> two different groups, have a blank row between them and be able to
> sort based on columns that apply to both groups of rows but without
> the rows from one group actually mixing with the rows from another
> group.
>
> So, basically, I want to have a table like this:
>
> TABLE:
> Group 1 Row 1
> Group 1 Row 2
> Group 1 Row 3
> Group 1 Row 4
> - blank row -
> Group 2 Row 1
> Group 2 Row 2
> Group 2 Row 3
>
> So any re-sorting on any of the columns would sort the top 4 rows
> amongst themselves, keep the blank row after that 1st group and then
> resort the bottom 3 rows amongst themselves too, without any
> intermingling and mixing of the two groups of rows.
>
> Is this possible at all, with some modifications or custom plugin/
> code? How would I go about putting this together if so?
>
> Thanks!
>

Reply via email to