Filtering Table rows using Jquery

前端 未结 9 1304
悲&欢浪女
悲&欢浪女 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 19:53

    I used Beetroot-Betroot's solution, but instead of using contains, I used containsNC, which makes it case insensitive.

    $.extend($.expr[":"], {
    "containsNC": function(elem, i, match, array) {
    return (elem.textContent || elem.innerText ||
    "").toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0;
    }
    });
    

提交回复
热议问题