I'm trying to find the following node within a page:
<span class="dotted">Admin</span>
I've tried the following jQuery selectors, but neither seem to work in selecting the node:
$(".dotted span:contains('Admin')").css("color","red");
$("span:contains('Admin') .dotted").css("color","red");
What am I doing wrong?
This selector should do what you want.
$("span.dotted:contains('Admin')")
Remember you can chain Tag names with IDs and classes. Example
$("span#yourID")
OR
$("span.yourclass")
OR a mixture of the two
$("span#yourID.yourClass")