I have a div that is being used as a dialog with jQuery's .dialog(). This div has a select box with options. The options the user has already selected are displayed on the main page. They can remove options from the main page and can open the dialog multiple times to add more options.
I populate the select box with all possible options on page load, but then when I open the dialog box I use jQuery's hide() to hide the options that the user has already selected and are displayed on the main page. This adds the CSS display:none; to the element in question, which IE ignores on <option> tags and displays anyway.
I can easily enough call remove() instead and remove it from the DOM. However, if the user selects some options, them removes them on the main page, then opens the dialog again to select more options, the options are no longer in alphabetical order, the options that were removed from the DOM and put back in it are now at the bottom since I used .append().
Is there any way to get IE to hide <option> tags? Or is there a better way to do this? Or is there a way to insert in alphabetical order simply?