简体   繁体   English

jQuery扩展功能可过滤“不区分大小写”

[英]jQuery extendable function to filter “case-insensitive”

After search in jQuery functions I found .Contains() but it's not help me jQuery函数中搜索后,我发现了.Contains()但对我没有帮助
I want make new function that can filter case-insensitive 我想做一个可以过滤不区分大小写的新功能

这很容易!

jQuery.expr[':'].iContains = (a, b, c) => jQuery(a).text().toUpperCase().indexOf(c[3].toUpperCase()) >= 0;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM