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

156
Views
Agregar ID personalizado al contenedor select2

Obtuve el siguiente código para mi menú desplegable select2. ¿Es posible dar una identificación personalizada al contenedor select2 select2? Necesito una ID personalizada para poder agregarle una determinada clase.

 <th id="filter_16" class="cell "> <select id="input_16" class="select-filter select2-hidden-accessible" name="filter[aa_location_type_code]" data-select2-id="select2-data-input_16" tabindex="-1" aria-hidden="true"></select> <span class="select2 select2-container select2-container--default select2-container--focus" dir="ltr" data-select2-id="select2-data-11-gj73" style="width: 60px;"></span> <script> $(document).ready(function () { $("#input_16").select2(); }); </script> </th>
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Si necesita agregar una determinada clase al contenedor select2, puede usar select2 containerCssClass

 $select.select2({ containerCssClass: 'myContainerCssClass' });
about 4 years ago · Juan Pablo Isaza Report

0

$(documento).ready(function () { let elemento = documento.querySelector(".select2-container") elemento .id='newId' });

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!