// Resets the sort direction so that clicking on an unsorted column will sort in the sortInitialOrder direction.
sortRestart : true,
sortInitialOrder: 'desc',
headers : {
// 0 : { lockedOrder: 'asc' }, only allow sorting in one direction
3 : { sortInitialOrder: 'asc' },
4 : { sortInitialOrder: 'asc' },
5 : { sortInitialOrder: 'asc' }
}
});
});</script>
</head>
<body>
<divid="banner">
<h1>table<em>sorter</em></h1>
<h2>Reset/Restart the sort</h2>
<h3>Flexible client-side table sorting</h3>
<ahref="index.html">Back to documentation</a>
</div>
<divid="main">
<pclass="tip">
<em>NOTE!</em>
<ul>
<li>The default <codeclass="hilight">sortInitialOrder</code> for the entire table is set to <codeclass="hilight">desc</code> (descending sort).</li>
<li>The last three columns have the initial sort order set in the ascending direction, using the headers option.</li>
<li>Test the <codeclass="hilight">sortReset</code> option by clicking on any column at least three times. It should sort in the <codeclass="hilight">sortInitialOrder</code> direction on the first click, the opposite direction on the second click, then reset to the original sort order on the third click. This cycle repeats on subsequent sorts.</li>
<li>Test the <codeclass="hilight">sortRestart</code> option by clicking on any unsorted column to see that it will always restart from the <codeclass="hilight">sortInitialOrder</code>.</li>