Bootstrap Multiselect Issue

Bootstrap Multiselect Issue

Hi,

I have the following code, taken from Bootstrap Multiselect:

  1. nonSelectedOptions.each(function() {
  2. var input = $('input[value="' + $(this).val() + '"]');
  3. input.prop('disabled', true);
  4. });

The above works, as it disables all items in dropdown A but it is also disabling items in dropdown B because this line doesn't specify the dropdown ID/class:

  1. var input = $('input[value="' + $(this).val() + '"]');

So if the index was 5, it will set 5th items in all dropdowns on the current page as disabled.

Any idea?