<h2>Sort multiple tbodies by primary row (beta)</h2>
<h3>Flexible client-side table sorting</h3>
<ahref="index.html">Back to documentation</a>
</div>
<divid="main">
<p></p>
<br>
<divid="root"class="accordion">
<h3id="notes"><ahref="#">Notes</a></h3>
<div>
<ul>
<li>This widget (<spanclass="version">v2.22.2</span>) allows the sorting of tbodies (not rows) based on a specified row set by the <code>sortTbody_primaryRow</code> option.</li>
<li>This widget replaces the <ahref="index.html#cssinfoblock"><code>cssInfoBlock</code></a> setting:
<ul>
<li>The value is replaced with the value from <code>sortTbody_noSort</code> option so as to include info-only tbodies in the tbody sort.</li>
<li>Due to this modification, tbodies with <code>colspan</code> and <code>rowspan</code> cells may not sort or filter as expected, so it would be best to <em>avoid <code>colspan</code> and <code>rowspan</code> cells in the primary row!</em></li>
</ul>
<li>This widget also modifies the <ahref="index.html#serversidesorting"><code>serverSideSorting</code></a> option:
<ul>
<li>This value is set to <code>true</code> to disable tbody internal row sorting.</li>
<li>This value is set to <code>false</code> (default) when the <code>sortTbody_sortRows</code> widget option is <code>true</code>.</li>
<li>This modification should not dramatically affect other widgets; at least none that I can think of right now.</li>
</ul>
<br>
</li>
<li>In these demos,
<ul>
<li>Primary Rows are styled with a <spanclass="info">light yellow background</span> as an indicator.</li>
<li>The primary row color difference is important in the <ahref="#sort-internal-rows">third table</a> when the sorting of internal rows is enabled (<code>sortTbody_sortRows</code> is <code>true</code>).</li>
<li>The first two tables:
<ul>
<li>Primary rows are clickable. Clicking on them toggles the sibling rows (in the <ahref="#table1">first table</a>), or child rows (in the <ahref="#table2">second table</a>).</li>
<li>Primary rows have a dark top border to add a visual separation of each tbody.</li>
<li><spanclass="label warning">*NOTE*</span> when filtering the content of the <ahref="#table1">first table</a>, sibling rows that do not match the query will be hidden. Toggling their view is only possible because the <code>"filtered"</code> class (used by the filter widget & set by the <ahref="index.html#widget-filter-filteredrow"><code>filter_filteredRow</code></a> widget option) is toggled.</li>
</ul>
</li>
</ul>
<br>
</li>
<li><spanclass="label alert">*ALERT*</span> This widget requires tablesorter v2.22.2+ and jQuery 1.4+</li>
<spanclass="label label-info">TIP!</span> Click on the link in the option column to reveal full details (or <ahref="#"class="toggleAll">toggle</a>|<ahref="#"class="showAll">show</a>|<ahref="#"class="hideAll">hide</a> all) or double click to update the browser location.
<p><spanclass="label label-info">*NOTE*</span> This will accept any jQuery selector, so it is possible to target multiple classes <code>'.main, .primary'</code>, but only the first found cell in the sorted column will be used when sorting the tbody.</p>
<p><spanclass="label warning">*WARNING*</span> This widget was not designed to deal with <code>colspan</code> or <code>rowspan</code> within the primary row, so it is best to avoid them.</p>
<tr><tdcolspan="4">Batman is the superhero protector of Gotham City, a man dressed like a bat who fights against evil and strikes terror into the hearts of criminals everywhere. In his secret identity he is Bruce Wayne, billionaire industrialist and notorious playboy. Although he has no superhuman powers, he is one of the world's smartest men and greatest fighters. His physical prowess and technical ingenuity make him an incredibly dangerous opponent. He is also a founding member of the Justice League and the Outsiders.</td></tr>
<tr><tdcolspan="4">Hal Jordan is the most well-known Green Lantern. He was the first earthman ever inducted into the Green Lantern Corps, and has been heralded as possibly the greatest Green Lantern of all time. Green Lantern is also a founding member of the Justice League of America.</td></tr>
<tr><tdcolspan="4">Superman, also known as the Man of Steel, is one of the most powerful superheroes in the DC Universe. His abilities include incredible super-strength, super-speed, invulnerability, freezing breath, flight, and heat-vision.</td></tr>
<tr><tdcolspan="4">Charles Francis Xavier was born in New York City to the wealthy Brian Xavier, a well-respected nuclear scientist, and Sharon Xavier. After Brian died in an accident, his science partner Kurt Marko comforts and marries the grieving Sharon. When Xavier's telepathic mutant powers emerge, he discovers Kurt cares only about his mother's money.</td></tr>
<trclass="tablesorter-childRow"><tdcolspan="4">Batman is the superhero protector of Gotham City, a man dressed like a bat who fights against evil and strikes terror into the hearts of criminals everywhere. In his secret identity he is Bruce Wayne, billionaire industrialist and notorious playboy. Although he has no superhuman powers, he is one of the world's smartest men and greatest fighters. His physical prowess and technical ingenuity make him an incredibly dangerous opponent. He is also a founding member of the Justice League and the Outsiders.</td></tr>
<trclass="tablesorter-childRow"><tdcolspan="4">Hal Jordan is the most well-known Green Lantern. He was the first earthman ever inducted into the Green Lantern Corps, and has been heralded as possibly the greatest Green Lantern of all time. Green Lantern is also a founding member of the Justice League of America.</td></tr>
<trclass="tablesorter-childRow"><tdcolspan="4">Superman, also known as the Man of Steel, is one of the most powerful superheroes in the DC Universe. His abilities include incredible super-strength, super-speed, invulnerability, freezing breath, flight, and heat-vision.</td></tr>
<trclass="tablesorter-childRow"><tdcolspan="4">Charles Francis Xavier was born in New York City to the wealthy Brian Xavier, a well-respected nuclear scientist, and Sharon Xavier. After Brian died in an accident, his science partner Kurt Marko comforts and marries the grieving Sharon. When Xavier's telepathic mutant powers emerge, he discovers Kurt cares only about his mother's money.</td></tr>
<trclass="tablesorter-childRow"><tdcolspan="4">Susan's primary power deals with light waves, allowing her to render herself and others invisible.</td></tr>