<li>This widget will <strong>only work</strong> in tablesorter version 2.8+ and jQuery version 1.7+.</li>
<li>This widget may not work properly if the table header includes rows with row or column spans.</li>
<li>The responsive part of this widget
<ul>
<li>Uses similar parameters as those used by jQuery mobile to set <ahref="http://view.jquerymobile.com/1.3.2/dist/demos/widgets/table-column-toggle/#Settingcolumnpriority">column priority</a>.</li>
<li>Any named data-priority, other than the numbers 1 - 6, (e.g. "critical" or "persistent") will be treated as a column which <em>will not be included</em> in the column selector.</li>
<li>Note that this widget uses media queries, which <ahref="http://caniuse.com/#search=media">will not work in IE8 and older browsers</a>.</li>
</ul>
</li>
<li>The selector code uses css selectors, for optimal speed, to hide/show columns. These selectors <ahref="http://caniuse.com/#search=nth-child">will not work in IE8 and older browsers</a>.</li>
<li>The column button & popup is completely customizable, and in this demo it includes css that may not work properly in older versions of IE.</li>
</ul>
</div>
<h3><ahref="#">Options</a></h3>
<div>
<h3>Column selector widget default options (added inside of tablesorter <code>widgetOptions</code>)</h3>
<ul>
<li><code>columnSelector_container</code> (<code>null</code>) - Target an element within the current page where the column selector will be inserted.
<ul>
<li>This can be either a jQuery selector string ( e.g. <code>'#columnSelector'</code> )</li>
<li>or, a jQuery object ( e.g. <code>$('#columnSelector')</code> ).</li>
</ul>
</li>
<li><code>columnSelector_columns</code> (<code>{}</code>; empty object) - Assigns a column status for each selector:
<ul>
<li>To disable, or remove a column from the column selector, include the key word <code>"disable"</code> - this is one of many ways to remove a column from the column selector popup</li>
<li>Set a column status to <code>true</code> to initially display a column. This is the default for undefined columns.</li>
<li>Set a column status to <code>false</code> to initially hide a column.</li>
<li>Examples:
<preclass="prettyprint lang-js">widgetOptions : {
columnSelector_columns : {
0 : "disable", /* disable; i.e. remove column from selector */
1 : false, /* start with column hidden */
2 : true, /* start with column visible; default for undefined columns */
}
}</pre></li>
<li><code>columnSelector_saveColumns</code> (<code>true</code>) - Save the current manually set column status (not the column's responsive state). This option requires the storage utility contained within the tablesorter widgets file (<code>jquery.tablesorter.widgets.js</code>).</li>
<li><code>columnSelector_layout</code> (<code>'<label><input type="checkbox">{name}</label>'</code>) - This option defines the markup used for each column selector within the popup. The only required parameter is the <code>{name}</code> string which will be replaced with the appropriate column name/title.</li>
<li><code>columnSelector_name</code> (<code>"data-selector-name"</code>) - The data-attribute within the table header cell which contains an alternate column selector name.
<ul>
<li>If the header cell does not have this attribute defined, the column selector name will be taken from the header cell internal text.</li>
<li>If defined, the text contained within this attribute will replace the <code>{name}</code> string within the layout option above.</li>
</ul>
</li>
<li><code>columnSelector_mediaquery</code> (<code>true</code>) - Set this option to add (<code>true</code>) or not add (<code>false</code>) the media query functionality of this widget.</li>
<li><code>columnSelector_mediaqueryName</code> (<code>"Auto: "</code>) - When the media query checkbox is added (it also uses the <code>columnSelector_layout</code> markup), this is the name that is added. Set as "Auto" to signify to the user that columns disappearing and/or reappearing is automatically done.</li>
<li><code>columnSelector_mediaqueryState</code> (<code>true</code>) - Set this option to <code>false</code> to start with the media query disabled (manual column selection mode).</li>
<li>This option defines the media query breakpoints with which to use when a column with the associated priority is hidden or revealed.</li>
<li>For example, the last entry "70em" (1,120px) is assigned to data-priority 6. When the browser width is below this dimension, all columns with a data-priority of six will be hidden. Then when a browser width less than "60em" (960px) is reached, all columns of data-priority 5 and above will be hidden. At "50em" (800px), all columns of data-priority 4 and above are hidden, etc.</li>
<li>Adjust these values as desired, but a <em>maximum</em> of six data-priorities is set.</li>
</ul>
</li>
<li><code>columnSelector_priority</code> (<code>"data-priority"</code>) - This is the assigned data-attribute which contains the defined data priority for a table column.
<ul>
<li>Values of 1 through 6 set the breakpoints of that particular column.</li>
<li>A value of 1 has the highest priority, meaning it is the last column(s) to be hidden when the browser width goes below "20em" (320px).</li>
<li>A value of 7 has the lowest priority, meaning it is the first column(s) to be hidden when the browser width goes below "70em" (1,120px).</li>
<li>Any named priority value, (e.g. "critical" or "persistent") will flag the widget to remove that column from the selector list.</li>
<li>Undefined priorities will default to a priority value of 1.</li>
</ul>
</li>
</ul>
</div>
<h3><ahref="#">Removing a column from the selector</a></h3>
<div>
This is probably overkill, but there are numerous ways to remove a column from the selection popup:
<ul>
<li>Setting the <code>data-priority</code> to any non-numerical name (e.g. "critical" or "persistent").</li>