[Solved] If A and B are selected within same dropdown, how do I disable C?


Here is a quick example…basically in the jQuery function you need to check which options are selected and then execute the disable logic…this is a template:

https://jsfiddle.net/6kdthxgr/3/

const list = $('#list');
const both = list.find('option:last-child');

list.on('change', () => {
  if (list.find('option:selected').length === 2 &&
    !both.prop('selected')) {
    both.prop("disabled", true);
  }
});

2

solved If A and B are selected within same dropdown, how do I disable C?