diff --git a/docs/index.html b/docs/index.html
index ffa18b71..bb8c616d 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -976,6 +976,14 @@
Example |
+
+
+ sortResetKey |
+ String |
+ "ctrlKey" |
+ The key used to reset sorting on the entire table. Defaults to the control key. The other options are "shiftKey" or "altKey" . Reference: https://developer.mozilla.org/en/DOM/MouseEvent |
+ |
+
sortRestart |
diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js
index 92fbacd4..5227f04e 100644
--- a/js/jquery.tablesorter.js
+++ b/js/jquery.tablesorter.js
@@ -39,9 +39,10 @@
cancelSelection : true, // prevent text selection in the header
dateFormat : 'mmddyyyy', // other options: "ddmmyyy" or "yyyymmdd"
sortMultiSortKey : 'shiftKey', // key used to select additional columns
+ sortResetKey : 'ctrlKey', // key used to remove sorting on a column
usNumberFormat : true, // false for German "1.234.567,89" or French "1 234 567,89"
delayInit : false, // if false, the parsed table contents will not update until the first sort
- serverSideSorting : false, // if true, server-side sorting should be performed because client-side sorting will be disabled, but the ui and events will still be used.
+ serverSideSorting: false, // if true, server-side sorting should be performed because client-side sorting will be disabled, but the ui and events will still be used.
// sort options
headers : {}, // set sorter, string, empty, locked order, sortInitialOrder, filter, etc.
@@ -456,7 +457,6 @@
}
// sort multiple columns
-/* */
function multisort(table) { /*jshint loopfunc:true */
var dynamicExp, sortWrapper, col, mx = 0, dir = 0, tc = table.config,
sortList = tc.sortList, l = sortList.length, bl = table.tBodies.length,
@@ -573,7 +573,7 @@
// $cell = $(this);
k = !e[c.sortMultiSortKey];
// get current column sort order
- cell.count = (cell.count + 1) % (c.sortReset ? 3 : 2);
+ cell.count = e[c.sortResetKey] ? 2 : (cell.count + 1) % (c.sortReset ? 3 : 2);
// reset all sorts on non-current column - issue #30
if (c.sortRestart) {
i = cell;