Currently, I need to check a specific anchor tag to see if it contains certain text. If it does then I need it to change the text of another element. Just as an example, I have the following code. However, no matter what I put in as being contained within an anchor tag, it always alerts "yup!".
if ($("a:contains('Level 2 (Admin Only)')")) {
alert("yup!");
}
else {
alert("nope!");
}
What am I doing wrong? Should I use a different selector method?