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

78
Views
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
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!