mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Add tabIndex option. Fixes #415
This commit is contained in:
parent
c35b7cef9b
commit
5b57f2f2ee
@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
// *** functionality
|
// *** functionality
|
||||||
cancelSelection : true, // prevent text selection in the header
|
cancelSelection : true, // prevent text selection in the header
|
||||||
|
tabIndex : true, // add tabindex to header for keyboard accessibility
|
||||||
dateFormat : 'mmddyyyy', // other options: "ddmmyyy" or "yyyymmdd"
|
dateFormat : 'mmddyyyy', // other options: "ddmmyyy" or "yyyymmdd"
|
||||||
sortMultiSortKey : 'shiftKey', // key used to select additional columns
|
sortMultiSortKey : 'shiftKey', // key used to select additional columns
|
||||||
sortResetKey : 'ctrlKey', // key used to remove sorting on a column
|
sortResetKey : 'ctrlKey', // key used to remove sorting on a column
|
||||||
@ -443,7 +444,7 @@
|
|||||||
// add to parent in case there are multiple rows
|
// add to parent in case there are multiple rows
|
||||||
$t.parent().addClass(ts.css.headerRow + ' ' + c.cssHeaderRow);
|
$t.parent().addClass(ts.css.headerRow + ' ' + c.cssHeaderRow);
|
||||||
// allow keyboard cursor to focus on element
|
// allow keyboard cursor to focus on element
|
||||||
$t.attr("tabindex", 0);
|
if (c.tabIndex) { $t.attr("tabindex", 0); }
|
||||||
});
|
});
|
||||||
// enable/disable sorting
|
// enable/disable sorting
|
||||||
updateHeader(table);
|
updateHeader(table);
|
||||||
|
Loading…
Reference in New Issue
Block a user