jQuery selector by xlink

后端 未结 5 1733
执笔经年
执笔经年 2021-01-27 11:19
$(\'a[xlink\\\\:href=#coastline]\').attr(\'class\',\'grey\');
$(\'a[xlink\\\\:href=#onshore]\').attr(\'class\',\'blue-light\');

This is what I currentl

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-27 11:54

    From your comment i'm thinking that you have smth like

     
         Link text here
     
    

    So, to change it's color you can try to change it's fill attribute like

     $('a[xlink\\:href=#coastline]').attr('fill','#ff00ff');
    

提交回复
热议问题