如何使jQuery包含不区分大小写的内容,包括jQuery 1.8+?
为了方便起见,在这里复制解决方案:
jQuery.extend(
jQuery.expr[':'], {
Contains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0" });以下是错误:
Error: q is not a functionSource File: /js/jquery-1.4.js?ver=1.4Line: 81
这里是我使用它的地方:
$('input.preset').keyup(function() {
$(this).next().find("li").removeClass("bold");
var theMatch = $(this).val();
if (theMatch.length > 1){
theMatch = "li:Contains('" + theMatch + "')";
$(this).next().find(theMatch).addClass("bold");
}
});
吃鸡游戏
小唯快跑啊
开心每一天1111
jeck猫
随时随地看视频慕课网APP
相关分类