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

110
Vistas
What does the double forward slash mean in this context?

I came across some code that looks like this:

get dropdownElement() {
  return $(`//button[@class='name_here']//span[contains(., 'Dropdown')]`);
}

And I'm confused as to what the "//" means here; I know that double backslashes are typically meant to escape a character, but I don't think I've ever seen a double forward slash. Also, when I see back ticks, they're usually accompanied by "$" so I was wondering about that too.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This is using XPath syntax to select elements with jQuery. The double slash essentially means "select all descendants that match this selector".

So //button[@class='name_here'] matches all elements that are buttons with the name_here class, and //button[@class='name_here']//span[contains(., 'Dropdown')] matches elements that descendants from those buttons, and are spans, and contain Dropdown.

about 4 years ago · Juan Pablo Isaza 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