「jQuery」:containsメソッドで指定文字列を含む要素を選択する方法
構文
$(“:contains(文字列)")
引数で指定した文字列を含む要素を選択します。
使用例
$("button").click(function(){
var cft=$("div:contains('user001')");
var target=$(cft);
if(target.length >0){
target.css("background-color", "yellow" ;
}
});