Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

199
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!