Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

220
Visualizações
How to get multiple values using jq

I want to get multiple statuses from a select when I press a button, there are about 5 options I either want to be able to get option 1 and 2 and 3 or all 5 of them but not empty ones.

What I am already doing will return 1 specific option which is optionA and If i replace this with .val() it will just get the first option in the list

  $('#myButton').on('click',function(){
      $('.filter__status').val("optionA");
      loadList();
  });

select option below

<div class="inputRow">
   <label>Status:</label>
    <select class="filter__status" id="status" name="index[filters][status]">
       <?php foreach (Options::statuses() as $status): ?>
          <option value="<?= $status ?>" <?= ($_GET['status'] === $status ? "selected" : "") ?>><?= $status ?></option>
       <?php endforeach; ?>
    </select>
</div>
<div id="myButton" class="button large"><i></i>&nbsp;<span>Show lists</span></div>

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda