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
- $('b:contains("price")').next();
--Hides all of them - WORKS
- $('b:contains("price")').next().hide();
--Does not work
- $('b:contains("price")').next(:not(:contains("$6."))');
--Returns 'Undefined'error but DOES contain the variables when I type XX into console
- var XX = $('b:contains("price")').next();
--So I try to use contains() with the variable XX...Does not work
- $('XX:contains("$6.")').hide();