Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

disable other options in select except the selected

 $("#lbCountries").click(function () {
     $("#lbCountires option").each(function (index) {
        if ($(this).is(':selected')) {
            $(this).prop('disabled', false);
         }
         else {
            $(this).prop('disabled', true);
         }
      });
  });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #disable #options #select #selected
ADD COMMENT
Topic
Name
2+7 =