jQuery provides some very powerful selection expressions using colon (:) syntax. Things like :first, :odd, and :even let you write code like: $('#content a:first') to get the first anchor within #content, or $('tr:odd') to get the odd numbered rows of a table.

(function($d,$,undefined){
    // Add this code anywhere you want (after jQuery has been loaded)
    // Edit it to add your own expressions. 
    $.extend(jQuery.expr[':'], { 
            //  Find inner content with case insensitive
            //  Apply with any innerHTML elements
            //  @usage: $(':containsNoCase(abc)') 
            //  @usage: $('#myForm:containsNoCase(abc)') 
       containsNoCase = function(el, i, m) {           
                var search = m[3];           
                if (!search) return false;           
                return eval("/" + search + "/i").test($(el).text());       
        }  
    });
})(document,jQuery);

Ref from: here

Add new comment