cross browser select options
hi
i have a simple html select control with 4 options.
i wish to show / hide these options depending on a condition.
ie condition 1
show - select / option1 / option2
condition 2
show - select / option 3
using .show / .hide doesnt work in IE so have got this approach working to remove options depending on the tested condition.
$(".dropdown_delivery option[value='1']").remove();
however when i try using append or appendto to put in the options to show it just repeats these every time the event is fired that includes this code. so i end up with the option(s) being repeated on and on.
2 questions... how would i add options and not have them repeatably appended, ie only do it once...
and how can i make the first option - select... - the default for both conditions whatever the other options...