I\'m trying to change any elements containing a particular text string to a red color. In my example I can get the child elements to become blue, but there\'s something about th
I think we should convert our text to lower case. It is better to check with lowercase and uppercase.
$('#main-content-panel .entry').each(function() { var ourText = $(this).text().toLowerCase(); // convert text to Lowercase if(ourText.match('replace me')) { $(this).css('color', 'red'); } });