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 8096351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:25:40+00:00 2026-06-05T21:25:40+00:00

<select class=one> <option></option> <option value=1>1</option> <option value=2>2</option> <option value=3>3</option> </select> <br /> <select class=one>

  • 0
<select class="one">
    <option></option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
</select>
<br />
<select class="one">
    <option></option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
</select>
<br />
<select class="one">
    <option></option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
</select>

$(".one").change(function(){

})

I would like make – for example if i select in first position option 1 then i others selects this option should be removed.
So if i in first select i select 1 then in select second and third i have only option 2 and 3. If in second select i select 2 then in last select i have only option 3.

How can i make it? I would like use jQuery.

LIVE: http://jsfiddle.net/9N9Tz/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-06-05T21:25:42+00:00Added an answer on June 5, 2026 at 9:25 pm

    If you need to sort something, consider using something like jQuery UI sortable as a bunch of drop down menus make a really poor UX for that.

    But to answer your question:

    var $selects = $('.one');
    $selects.on("keyup click change", function(e) {
      $selects.not(this).trigger('updateselection');
    }).on("updateselection", function(e, data) {
      var $this = $(this);
      $this.children().show();
      $selects.not(this).each(function() {
        var value = $(this).val();
        if (value) {
          $this.children('[value="' + value + '"]').hide();
        }
      });
    });
    
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <select class="one">
      <option></option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
    </select>
    <br />
    <select class="one">
      <option></option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
    </select>
    <br />
    <select class="one">
      <option></option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
    </select>
    

    Hiding an option works in current firefox. I’m not sure about legacy browser. Hiding, but not removing, the element makes sure that you can change your selection without having crippled your input elements.

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

Sidebar

Related Questions

I have a select element. <select class='cSelectType'> <option value=1>one</option> <option value=2>two</option> <option value=3>three</option> <option
When some one clicks a link I need the select box value to change
I've jQuery function on change for a select element: $(#category).change(function(){ $(table[id=advance_search]).append(<tr id='item_type'></tr>); $(tr[id=item_type]).append(<td class='field_input'><select
I have this selector: <select name=type id=type> <option class=sub_1 value=1>1</option> <option class=sub_2 value=2>2</option> <option
I am calling a page that returns data like: <div id=class> <option>Value</option> <option>Value</option> </div>
I have the following: HTML <select class=dropDownList id=PersonFunction> <option value=>Choose</option> <option value=1>Vice President</option> <option
I have one demo application to check select for update query public class Test
I can select the first item in the div using $('.class:first') Now since I
jQuery(document).ready(function($) { $('.c5sliderSelect').change(function() { alert('change clicked'); }); }); When I change the select list
I cannot target an element in jQuery. First example which works : $(document).ready(function() {

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.