Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

200
Visualizações
Change span text referring to parent href attribute

I'm looking to change the text on span, but I couldn't target by class nor ID, as they have the same classes, the only difference I spot is the parent link href attribute, Is there a way I can target them?

Code I'm looking to change

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Although you could select from the actual text (Customers, Products etc) as this is what will be changed it would only work first time and we aren't told whether the change may need to take place more than once.

A more reliable way would be to select on the hrefs and their ultimate strings.

In CSS this can be done using the $ sign. For example:

a[href$="Customers"]

See MDN.

You add more to this to ensure you target only items in that list.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda