Add this line to your change event handler
$("#theSelect option:selected").attr('disabled','disabled') .siblings().removeAttr('disabled');
This will disable the selected option and enable any previously disabled options.
EDIT:
If you do not want to reactivate the previous ones, simply delete this part of the line:
.siblings().removeAttr('disabled');
EDIT:
http://jsfiddle.net/pd5Nk/1/
To turn it back on when you click the Delete button, add it to the click handler.
$("#theSelect option[value=" + value + "]").removeAttr('disabled');
user113716 May 19 '10 at 16:21 2010-05-19 16:21
source share