Disable Drop Down Option using jQuery

Working demo http://jsfiddle.net/BYkVW/ or http://jsfiddle.net/BYkVW/1/

Hope it helps the needs :)

code

$("#field_0_1 option[value='- Sold Out -']").attr('disabled','disabled');
        ​

or

$("#field_0_1 option[value='- Sold Out -']").prop('disabled','disabled');

working image

enter image description here


$("select option[value*='Sold Out']").prop('disabled',true);
        ​

Demo

According to edit

$('#previous_select').on('change', function() {
   // after creating the option
   // try following
   $("select option[value*='Sold Out']").prop('disabled',true);
});