I want to use jQuery to find a link and hide it . I want to search for the text of the link using jQuery. This doesn't work:
<a href="example.com/foo-bar">a website link</a>
function replace_text() {
var linkText = jQuery('a').text();
var answer = linkText.replace('a website link', '');
}
replace_text();