Using contains() and not contains() in the same line.

Using contains() and not contains() in the same line.

Im trying to run contains() method twice. Also using next() method. I dont know the proper way to do that.

I have elements I want to target but they only have b tags around them. Like 'Price:', beside that could be '$2'. If does NOT have '$2' then hide() those elements. (so only $2 prices are shown.)


--Find b tags that are next to the b tag with "price"(which would hold the actual dollar amount) 
--WORKS
  1. $('b:contains("price")').next();


--Hides all of them - WORKS
  1. $('b:contains("price")').next().hide();


--Does not work
  1. $('b:contains("price")').next(:not(:contains("$6."))');


--Returns 'Undefined'error but DOES contain the variables when I type XX into console
  1. var XX = $('b:contains("price")').next();


--So I try to use contains() with the variable XX...Does not work
  1. $('XX:contains("$6.")').hide();