Filtering Table rows using Jquery

前端 未结 9 1302
悲&欢浪女
悲&欢浪女 2020-11-30 19:19

I found a Jquery script that does the table filtering stuff based on input field. This script basically takes the filter, splits each word and filters table rows with each w

9条回答
  •  温柔的废话
    2020-11-30 20:13

    nrodic has an amazing answer, and I just wanted to give a small update to let you know that with a small extra function you can extend the contains methid to be case insenstive:

    $.expr[":"].contains = $.expr.createPseudo(function(arg) {
        return function( elem ) {
            return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
        };
    });
    

提交回复
热议问题