jquery: call functions immediately after plugin

Posted by Dave on Stack Overflow See other posts from Stack Overflow or by Dave
Published on 2010-04-26T18:48:58Z Indexed on 2010/04/26 18:53 UTC
Read the original article Hit count: 231

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-plugins