Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8453755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:50:42+00:00 2026-06-10T11:50:42+00:00

<select id=name > <option value= selected=selected>Please select</option> <option value=Alex>Alex</option> <option value=Greg>Greg</option> </select> If we

  • 0
<select id="name" >
    <option value="" selected="selected">Please select</option>
    <option value="Alex">Alex</option>
    <option value="Greg">Greg</option>
</select>

If we try to append an option to it, by

$('<option>Hi</option>').appendTo($('#name'))

then, the option is added to the select box, as is expected. But, if we do the following :

var a = $('#name option')[1];
$(a).appendTo($('#name'));

then, the option is not appended to the options. Instead, “Alex” now comes at the end. My question is that another “Alex” option should have been appended at the end, with the original “Alex” remaining in its place

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:50:43+00:00Added an answer on June 10, 2026 at 11:50 am
    $('#name option')[1] 
    

    SELECTS the element.

    When you SELECT an element, you select it. lol..

    It is not COPIED. To get the desired result you must do

    var a = $('#name option')[1];
    $(a).clone().appendTo($('#name'));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the value retrieved from database : <select id=approve name=approval> <option value=0>-- Please
<select name=securityq1 class=selectInput> <option value=>Please select</option> <option value=What is your matric no?>What is your
I have a list like this: <select name=select_list_name id=list_id> <option value=>Select Option</option> <option value=value1>Option
INSERT INTO options (owner, name, value, modified) SELECT owner, name, value, modified, @draft:=draft FROM
Suppose I have a form like this: Name:<input type=text name=xxx id=name/> Type:<select> <option>xx</option> <option>xx</option>
The select lists are not rendering with the correct option selected. I've tried this
I am trying to create a drop down list box with the selected value
I am trying to copy a name of the selected html form option field
Can someone please help me find if there is any option selected I currently
how do i get the dropdown rel=30 value? <select id=t_dermal_name> <option value=1 rel=30>Between Eyebrows</option>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.