12AX7 12AX7 - 1 year ago 147
Javascript Question

jQuery Tablesorter - Disable Sort AND Filter

I got this code from http://mottie.github.com/tablesorter/docs/example-options-headers.html:

// BONUS TIP: disable a column using jQuery data directly
// but do it before the table initializes
$("table thead th:eq(5)").data("sorter", false);

This works and I can add a 2nd line as shown below to disable filtering. However, I want to combine them into one line. How would I do that?

// I Want to combine this into the prev line
$("table thead th:eq(5)").data("filter", false);

Answer Source


$("table thead th:eq(5), table thead th:eq(7)").data("sorter", false).data("filter", false);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download