HTML中的特定文本:使用jQuery .filter()选择DIV
<p class="greeting">
hello, my name is kevin. what's yours?
</p>
的jQuery:
$("p.greeting").filter(function(){
return $this.text() === "my name is";
}).css("background", "green");
我试图孤立的话 “我的名字叫” 在<p class="greeting">
标签。任何人都可以帮助我与jQuery,因为它似乎不工作。谢谢。
可能的重复http://stackoverflow.com/questions/926580/find-text-string-using-jquery – motoxer4533