:not(tr[id^="review"]) that says: trs which do NOT contain an id that does NOT equal "review". in other words, TRs which DO contain the word "review" in it's id.
You want "not contains" instead: $('#replies tr[id^=r]:not ([id*=review])'); cheers, - ricardo On Mar 9, 1:55 am, Yansky <forbo...@gmail.com> wrote: > Hi, I'm trying to get all table rows on a page that have an id that starts > with the letter "r", but not any table rows that have id's which contain the > word "review". > > I've tried to use the :not() method, but I don't think I'm using it > correctly as it doesn't seem to be filtering out table rows that have id's > which contain the word "review". > > My attempt: > $('#replies tr[id^="r"]:not(tr[id^="review"])'); > > I've figured out how to do it with regular xpath, but I'm not sure how to > convert that to a jQuery selector statement. > > var mems = document.evaluate( '//tr[contains(@id, "r")][ not(contains(@id, > "review") )]' ,document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null > ); > > for (var l = 0; l < mems.snapshotLength; l++){ > > console.log(mems.snapshotItem(l)); > > } > > -- > View this message in > context:http://www.nabble.com/Help-with-selectors-and-%3Anot%28%29-tp22407206... > Sent from the jQuery General Discussion mailing list archive at Nabble.com.