<p>Hello my name is Daniel</p>
<p>I have lots to say</p>
<p>I like cake</p>
<p>But I'll never tell</p>
$.expr[":"].contains = $.expr.createPseudo(function(arg) {
return function( elem ) {
return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
};
});
var things = [ "is", "cake" ];
for (var i = things.length - 1; i >= 0; i--) {
var words = things[i];
$("p:contains('" + words + "')").hide();
};
This Pen doesn't use any external CSS resources.