検索< a> href(jQuery)の画像拡張子付き
質問
ワードプレスの抜粋が壊れるので、hrefの画像(.jpg、.png、.gif)を含むすべてのリンクを検索(および非表示)する必要があります。
どうもありがとう。
解決
$('a').filter(function() {
return $(this).attr('href').match(/\.(jpg|png|gif)/i);
}).hide();
他のヒント
さて、考え出した:P
$("a[href$='.jpg']").addClass('hide');
所属していません StackOverflow