jQuery/属性フィルタ()

解説 要素を絞り込む
*=	部分一致	指定した属性の値を「含む」要素
^=	前方一致	指定した属性の値から「始まる」要素
$=	後方一致	指定した属性の値で「終わる」要素
!=	否定	指定した属性の値を「除く」要素
sample1

href="http://google.co.jp"

href="http://yahoo.co.jp" target="_blank"

href="arise.work" target="_self"

sample1code
$(function(){
  $("#s1Btn01").click(function(){
  	$("a[target]").css("color", "red");
  });
  $("#s1Btn02").click(function(){
  	$("a[target='_blank']").css("color", "blue");
  });
  $("#s1Btn03").click(function(){
  	$("a[href*='work']").css("color", "purple");
  });
  $("#s1Btn04").click(function(){
  	$("a[href*='co.jp'][target]").css("color", "green");
  });
});