Do not use createPseudo :
jQuery.expr[":"].Contains = function(obj,index,meta) { return jQuery(obj).text().toUpperCase().indexOf(meta[3].toUpperCase()) >= 0; };
From here .
It doesnβt matter where you put it - you simply define the function, and do not access the DOM, so it should not be inside document.ready . Just make sure you load jQuery before defining this filter and defining it before using it. Hope this helps!
source share