I have a script that replaces text and adds a class. It works great, but I have two classes that both have "new" in them and then contain doesn't work. How do I match all the words in the string?
code:
$('body').ready(function(){
$( "span.conditionHilite:contains('Begagnat')" ).text('Refurbished').addClass("refurbHilite" );
$( "span.conditionHilite:contains('New Spares')" ).text('New spares').addClass( "refurbHiliteSpares" );
$( "span.conditionHilite:contains('New')" ).text('New').addClass( "refurbHiliteNew" );
});