[jQuery] Re: Select all even row in table that are not with a specified class.
Yes, you can. In doubt, just try it, it doesn't hurt :) $("table.font_quotazioni tr:odd:not(.highlight,.midlight)").addClass ("even"); $("table.font_quotazioni tr:odd:not(.highlight):not (.midlight)").addClass("even"); $("table.font_quotazioni tr:odd").not(".highlight, .midlight").addClass ("even"); On Feb 11, 9:12 am, "m.ugues" wrote: > Is it possibile to add a condition in or to the not condition? > > jQuery("table.font_quotazioni tr:odd:not > ('.highlight','.midlight')").addClass("even"); > > Kind regards > > Massimo Ugues > > On Dec 23 2008, 10:04 pm, aquaone wrote: > > > Sure. > > $("table.font_quotazioni > > tr:even:not('.midlight')")...http://docs.jquery.com/Selectors/not#selector > > > stephen > > > On Tue, Dec 23, 2008 at 10:01, m.ugues wrote: > > > > Hallo all. > > > I got a table like this > > > > > > > > > > > > > Nome > > > > > > > > > > > > > > > foo > > > > > > > > > foo > > > > > > > > > foo > > > > > > > > > > > > > In my document.ready I set a class on even rows > > > > $("table.font_quotazioni tr:even").addClass("even"); > > > > I would like to exclude all the rows that got a certain class (e.g > > class="midlight" >) > > > Is it possible?
[jQuery] Re: Select all even row in table that are not with a specified class.
Is it possibile to add a condition in or to the not condition? jQuery("table.font_quotazioni tr:odd:not ('.highlight','.midlight')").addClass("even"); Kind regards Massimo Ugues On Dec 23 2008, 10:04 pm, aquaone wrote: > Sure. > $("table.font_quotazioni > tr:even:not('.midlight')")...http://docs.jquery.com/Selectors/not#selector > > stephen > > On Tue, Dec 23, 2008 at 10:01, m.ugues wrote: > > > Hallo all. > > I got a table like this > > > > > > > > > Nome > > > > > > > > > > foo > > > > > > foo > > > > > > foo > > > > > > > > > In my document.ready I set a class on even rows > > > $("table.font_quotazioni tr:even").addClass("even"); > > > I would like to exclude all the rows that got a certain class (e.g > class="midlight" >) > > Is it possible?
[jQuery] Re: Select all even row in table that are not with a specified class.
Sure. $("table.font_quotazioni tr:even:not('.midlight')")... http://docs.jquery.com/Selectors/not#selector stephen On Tue, Dec 23, 2008 at 10:01, m.ugues wrote: > > Hallo all. > I got a table like this > > > > > Nome > > > > > foo > > > foo > > > foo > > > > > In my document.ready I set a class on even rows > > $("table.font_quotazioni tr:even").addClass("even"); > > I would like to exclude all the rows that got a certain class (e.g class="midlight" >) > Is it possible? >