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

217
Views
jQuery return selected value of select box after clone

This is my code:

<div id="data">
  <div class="plus">
    <select>
      <option value="0">select</optionn>
      <option value="1">one</optionn>
      <option value="2">two</optionn>
    </select>
  </div>
</div>
<div class="add">
  ADD
</div>

And this is jQuery:

$(document).on('click', '.add', function(e){
    var clone = $('#data').find('.plus:eq(0)').clone();
    console.log(clone.find('select').val());
    console.log(clone.find('select option:selected').val());
    console.log(clone.find('select option').filter(":selected").val());
    $('#data').append(clone);
});

After select one from selectbox and then I click ADD, I get 0 value.

But I want to return 1 value!

JSFiddle: https://jsfiddle.net/uwkx9cqd/

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!