Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

142
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda