I am using a select menu which will allow multiple selections to be done. I have an event handler
$("#idInventory").change(function () {
$("#select option:selected").each(function () {
});
});
which is called when an item is selected. Here I collect what ever items are chosen . But I also need to know when each selected item is deselected so that I can track what is deselected so that I can keep track if something already chosen is now deselected by user.
UPDATE: I am not getting this event triggered when an item is deselected.
I think this is what you might be looking for:
Kinda working demo:
HTML
JS
UPDATE:
UPDATE #2