disable other options in select except the selected

Solutions on MaxInterview for disable other options in select except the selected by the best coders in the world

showing results for - "disable other options in select except the selected"
Alice
27 Nov 2020
1 $("#lbCountries").click(function () {
2     $("#lbCountires option").each(function (index) {
3        if ($(this).is(':selected')) {
4            $(this).prop('disabled', false);
5         }
6         else {
7            $(this).prop('disabled', true);
8         }
9      });
10  });
11
queries leading to this page
how to disable other options when selected 3fselect disable all optiondisable options select htmldisable a select elementdisable other options if one is selected dropdowndisable select option on clickdisable a option in selecthow to disable option in selectselection option disableselect 2 disable optionhow to disable some option in selecetuse disable in select listfor select and disable that elementdisable select option with specificdisable the select option in htmlselect disable optionhow to disable select options based another on select 3fhow to disable dropdown option when specific option is selecteddisable options according to other selectselect2 disable optionhow to make an option disable on select taguse disable on selectdisable options after selecting them select option with disablehow to disable html select optiondisable option in select when same option in another select is selecteddisable select optionsdisable selected option from one select box when selected in another select boxhtml disable option in selectselect disable option in selectdisable a select optiondisable select box optionjquery select remove all options except selecteddisable an option in select after selecting onedisable a select boxdisable all options but no disable option select dropdown jqueryhow to disable an option in selecton check enable and disable select optionhow to disable select optionselect list disable optiondisable option in selectdisable selected value after selecting itdisable select optionhow to disable selecthow to disable selecting in option box select htmldeactivate html optionappend option disable to select jqueryselect2 disable default selectionselect2 disableddisabled the other option after selecting a onedisable option select optionmake a select disabledisable item in select htmldisable on selecthtml disable select optionenable or disable a chosen select boxdisable an option in selecthow to disable other select options on select 3fchosen select disable optiondisable a option in select when another option is selected in another selectdisable selectdisable the other option after selecting onehow to disable other select options after inserting one option in the dboption selected is disabled in another select disable the other option after selecting a oneselect disable for selecthow to disable a select elementdisable selectiondisable the selection optionsdisable select html still selectabledisable the selectdisable option selecthtml select disable optionhow to enable disable select in htmldisable option in select in htmldisable other options in select except the selectedhow to disable other options on select 3fdisable one option in selectdisable option from selected listdisable other options if selected dropdowndisable all selected options after selecting onehow to disable a option in selectselect remove option with disableddisable options in select box disable other options in select except the selected