views:

78

answers:

2

I'm sure that there's an easy answer to this, but I can't find it.

I have a table 'myTable' which I stripe using the following

$("#myTable tr:even").css({ "background-color": "#FEE996" });
$("#myTable tr:odd").css({ "background-color": "#FFEFAF" });

This works fine.

I am also using a table filter plugin as follows

$('#myTable').tableFilter();

This plugin places a blank field at the top of each column into which the filter criteria can be typed. When the table is filtered it removes unmatched rows, which in turn messes up the striping. I would like to be able to re-invoke the lines to re-stripe the table.

Something like

$('#myTable').tableFilter().find("tr:even").css({ "background-color": "#FEE996" }).find("tr:even").css({ "background-color": "#FFEFAF" });

Is this possible please?

A: 

In the example it seems that tableFilter is already capable of striping internally.

It seems to be using the following CSS:

.offColor {
    background-color:#FDE9D9;
}
Diodeus
Thanks, the tableFilter is from PicNet, just to complicate things further I am also using tableSorter (.com) as well, so would like to perform the same action after re-sorting the table as well?
Dave
Why are you using tablesorter as well, when tableFilter can already sort?
Matt Ball
tableFilter from PicNet doesn't to my knowledge sort, it purely filters.
Dave
A: 

With no direct responses, I take it there is no easy way to call your own functions immediately after a plugin then?

Dave