Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

197
Vistas
How do I find a span with a specific class that contains an exact string of text?

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?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

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")
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda