user1297396
user1297396

Reputation: 119

Hiding filter input box instead of disabling + tablesorter 2

I need a little assistance. I am using a fork of JQuery TableSorter 2 (http://mottie.github.com/tablesorter/) to work and filter my tables. If i dont want certain columns to be used as filter, I simply need to add "filter-false" as a class to the selected column header.

My main question is whether there is a way I can actually hide the filter boxes on the selected columns instead of just disabling them...

Thanks

Emmanuel

Upvotes: 2

Views: 4307

Answers (2)

Julien
Julien

Reputation: 1

I recommend simply sticking with:

/* optional disabled input styling */ 
table.tablesorter thead tr.tablesorter-filter-row input.disabled { 
   opacity: 0.0; 
    filter: alpha(opacity=0); 
}

As having that one hidden, removes also the table's inner border thus creating unpleasant visual effect.

Upvotes: 0

Mottie
Mottie

Reputation: 86403

Here is the default css:

/* optional disabled input styling */ 
table.tablesorter thead tr.tablesorter-filter-row input.disabled { 
    opacity: 0.5; 
    filter: alpha(opacity=50); 
}

As seen, a disabled class is applied to those disabled filters, so you can use css to either apply display:none or visibility:hidden to it:

tr.tablesorter-filter-row input.disabled {
    display: none;
}

Upvotes: 6

Related Questions