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

80
Visualizações
return text between rather than value

I am learning as i go here, apologize for something that should seem simple, but I can't figure it out. I have a <select> with multiple options, and am trying to build an order summary before check out. Everything is working, except the value is being returned for the selected option. IS there an easy solution that would allow the value to stay in place and just have the text of the option be returned on the order summary?

$(document).ready(function() {
  $("select#option2").change(function() {
    var selectedOption2 = $(this).children("option:selected").val();
    $('.mk-step-2 span').text(selectedOption2);
  });
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<select id="option2">
  <option value="" disabled selected hidden> Your Choice... </option>
  <option value="option-1">option one</option>
  <option value="option-2">option two</option>
</select>

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