Hide column at init. table
Closed this issue · 4 comments
Hi,
In http://jsfiddle.net/3pS6v/222/, the columns still display. Please help and many thanks.
Hi @airthomas!
When setting up the column selector, the default setting of columnSelector_mediaquery
is true
which requires that data-priority
attributes are set for each header. Setting it to false
allows hidding columns. I'll make this more clear in the documentation.
$(function() {
$("table").tablesorter({debug: true,
theme: 'blue',
widgets: ['columnSelector'],
widgetOptions : {
columnSelector_mediaquery: false,
columnSelector_columns: {
0: false,
2: false
}
}
});
});
Also, the demo won't work unless the widget-columnSelector.js
file is loaded.
Hi Mottie,
I have tried http://jsfiddle.net/Mottie/3pS6v/223/, looks has cache problem, when I change
from
0: false,
2: false
to
0: false,
1: false
it is work, but if change back 0:false, 2:false, it will not work.
That is happening because the columnSelector_saveColumns
option is true
(demo).
great, many thanks Mottie.