I need to modify the following code (which works fine):
if ($("#cartable-items .cart-trigger[href='AC^ATZ^A10^4200']")) {
alert('Found it!');
}
To use the “contains:” selector like this:
if ($("#cartable-items .cart-trigger[href:contains('ATZ^A10')]")) {
alert('Found it!');
}
Is this possible?
Thanks!
Jason
Yes.. use the *= (Attribute contains word selector) – You can read more about the selectors here http://api.jquery.com/category/selectors/