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

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

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 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!