开发者

jquery: call functions immediately after plugin

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开发者_如何学Go 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?


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;
}


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜