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

279
Views
CSS selector to select an id with a slash in the id name?

I've got <span id="/about-us"> being generated by this CMS I'm using.

I'd like to select this element with jQuery but it doesn't seem to like selecting elements with a slash in them.

Is this possible?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

you can do

$("#\\/about-us")

      

over 4 years ago · Santiago Trujillo Report

0

you can do it like this

     $("span[id*='/about-us']")

where it will return the span with '/about-us' in it's id attribute.

over 4 years ago · Santiago Trujillo Report

0

Use the regular way:

document.getElementById('id/with/slashes')
over 4 years ago · Santiago Trujillo 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!