How can I properly search for a text string using the below statement in 1 row with many searches without redundantly using the same code.
example I use now to find a string on the page and add a starburst to a thumbnail product.
`// ##### 20% OFF HOLIDAY SALE
if ($(this).text().search(“Mystical Stealie Tie-Dye T-Shirt”) >=0 )
{
$(‘.ProductMobileThumbContainer’, this).before(‘<img class=”OnSaleItemBadgeMobileThumb” src=”https://liquidblue.com/template/images/_gui/20OFF.gif”>’);
}
`
I would rather search multiple products names in the first row instead of copying the entire block many times.
so something like adding && in between the 2 products strings?
` if ($(this).text().search(“Mystical Stealie Tie-Dye T-Shirt”) && (“Bright Side of the Moon”) >=0 )
`
AND OR so it can hold many strings in 1 row?
any help would allow me to eat turkey this thanksgiving.