I’ve just written the following function and although it works – as in row colours are applied to all tables except those with the class .noAlternatingRows, due to .net not being able to apply a class directly to a table (no idea why – i’m not a .net developer, it’s jut what i have been told) – i now need to remove table styling from tables that are nested within a span.
This works, however is there a way of combining the two together? I’ve tried to comma separate the elements which i do not want the styling applied to, but it doesn’t seem to work…
$("table:not(.noAlternatingRows, span table) tr:odd").css("background-color", "#d9d9d9");
$("table:not(.noAlternatingRows, span table) tr:even").css("background-color", "#f2f2f2");
$("span table tr:even").css("background", "none");
$("span table tr:odd").css("background", "none");
I’m sure there’s a neater way of writing it – thanks 🙂
that’s all folks ^^