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

230
Vistas
How to add load more feature inside a dropdown option

Bellow my simple html code for dropdown option

<select class="form-control" id="myList">
  <option  value="">Please select</option>  
  <option  value="1">1</option>
  <option  value="2">2</option>
  <option  value="3">3</option>
  <option  value="4">4</option>
  <option  value="5">5</option>
  <option  value="6">6</option>
  <option  value="7">7</option>
  <option  value="8">8</option>
  <option  value="9">9</option>
  <option value="load">
    <div id="loadMore">Load more</div>
  </option>
</select>

What i want to achive. I will show the option 1-5 after when click loadmore then will show more 5. I have researched few resource those are too poor and not so clear instruction. If you guys help me about it i will be glad for that. Thanks to all seniours developers.

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

Use this function on onClick on loadMore id

function addMore() {
    var optionsArr = ['10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20']
    for (let i = 0; i < optionsArr.length; i++) {
        var options = `<option value="${optionsArr[i]}">${optionsArr[i]}</option>`
        $("#myList").append(options)
    }
}

Hope this will help you

about 4 years ago · Santiago Gelvez 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