TableSorter jQuery Plugin - Enable Select Element in Disabled Header Column -
i using tablesorter jquery plugin. i'm trying place select element 1 of column headers. i've disabled particular column sorting doing this:
$('#rankings').tablesorter(headers: {5: {sorter:false}});
but when click on select element in column header options don't populate. it's if there "blocking" me clicking on it.
is there in tablesorter code disable clicking on element if disabled?
i experimenting on example page, , can't seem highlight text in column headers column headers disabled.
is there way place select in disabled column header using tablesorter? help!
there undocumented option cancelselection
can set false
(missing docs post), you'll need use onrenderheader
disable selection on other headers (if want) (demo):
$('table').tablesorter({ // make header text selectable cancelselection: false, headers: { 0: { sorter: false } }, // prevent text selections (optional) onrenderheader: function (index) { if (index > 0) { $(this) .addclass('no-select') .attr('unselectable', 'on') .bind('selectstart', false); } } });
Comments
Post a Comment