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

  • Home
  • SEARCH
  • 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 6865463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:03:09+00:00 2026-05-27T03:03:09+00:00

I have two Select lists, between which you can move selected options. When I

  • 0

I have two Select lists, between which you can move selected options. When I move options back over to the left list, I would like them to retain their original position in the list order, even if the list is missing some original options.

Here is my code: http://jsfiddle.net/6qUyK/1/

  • 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-05-27T03:03:09+00:00Added an answer on May 27, 2026 at 3:03 am

    You have to store the original position value. You can use the data attribute for this.

    Take a look at this example.

    Store original position:

    $(option).data('original-position',i);
    

    Retrieve original position:

    $('#listboxFootballPlayers option').eq($(this).data('original-position')).before($(this));
    

    Note that some of your code is unnecessary. For example you can use the append method (or before, or after) to actually move the selected element, so no need to create a new one and destroy the previous one.

    Also you have to adjust the code a little to work for the last item in the list. My code is just a hint.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two select lists, I would like jquery to either remove or disable
I have two lists and I want to select items that are not in
I have a content based, read-only iPhone app. Users can select favorite topics, which
I have a stored procedure which calculates the distance between two coordinate pairs as
I have a webpage with different elements (a list of links and two select
I have a webpage with two lists. A source list (represented by availableThings) populated
i have two select using as a dropdownlist for country/state everything works as i
Lets say I have two subqueries: SELECT Id AS Id0 FROM Table0 => Id0
I have the following two columns: SELECT b.ip_address AS IP ,b.mask AS MASK FROM
I have the following two queries: select count(*) from segmentation_cycle_recipients scr , segmentation_instance si

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.