<a href="#">Hide Me</a>
How do I find a link with text "hide" in it. I know how to find links by attributes but can't figure out how to find link by its text.
<a href="#">Hide Me</a>
How do I find a link with text "hide" in it. I know how to find links by attributes but can't figure out how to find link by its text.
$('a:contains(Hide)')
Note that contains
is case sensitive.
$('a:contains(Hide)').click(function() { $(this).hide() });