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

139
Views
can this selector be simplified

In an HTML page and with JQuery, I am trying to select all dropdown elements excluding their labels with the following selector. Can this selector be simplified? Thanks.

$('[id^=GG0130A_Admission]:not(label[id^=GG0130]), [id^=GG0130B_Admission]:not(label[id^=GG0130]), [id^=GG0130C_Admission]:not(label[id^=GG0130]),[id^=GG0130D_Admission]:not(label[id^=GG0130]),[id^=GG0130E_Admission]:not(label[id^=GG0130]),[id^=GG0130F_Admission]:not(label[id^=GG0130]),[id^=GG0130G_Admission]:not(label[id^=GG0130]),[id^=GG0130H_Admission]:not(label[id^=GG0130])').each(function () {}

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

@epascarello, thank you for mentioning common class. Each Admission <SELECT> element (A to H) has a sibling Discharge <SELECT> with the same prefix but different suffix. I used a common class and :not() to achieve what I need. Here is the selector.

$('.persistable[id^=GG0130]:not([id*=Discharge])')

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!