I am appending a disabled option into a <select> box, I have a slight issue though. If I append the options in the <select>, one of the options remains highlighted, which doesn’t seem like a big deal but it doesn’t look good when one disabled option is highlighted and obviously other options can’t be highlighted.
How can I remove the highlight when options are appended? Below is code:
var selectedOption = $('select#studentadd');
$('select#studentselect').append(selectedOption.html()).attr('disabled', 'disabled');
May be that is what you wanted:
Working jsFiddle is here