Here is the code for Select all anchors with a specific href with jquery:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("a").each(function(){
if($(this).attr("href") == "http://example.com/external/link/")
{
$(this).hide();
}
});
});
</script>
<a href="http://example.com/external/link/">a website link</a>
No comments:
Post a Comment