我有很多类似于这样的链接:
<a href="http://www.youtube.com/user/nigahiga">Youtube</a>
<a href="http://pinterest.com/pin/41236152807615600/">Pinterest</a>
<a href="https://www.facebook.com/manchesterunited">Facebook</a>
<a href="http://www.youtube.com/user/RayWilliamJohnson">Youtube</a>
<a href="http://pinterest.com/pin/24910604158520050/">Pinterest</a>
我该如何为那些链接到Pinterest的超链接添加样式?我尝试了以下方法:
$('a').attr('href').contains('pinterest').css('Styling here');
但它并不起作用。如何实现?