IE - Issue setting default value of a hidden single select dropdown
I have a single select dropdown in my application which is hidden for one type of user group. Before a user from this group can save any data, I have to explicitly select the default value of this dropdown for him as this dropdown is not visible to him.
Issue: In IE, this default value doesn't get selected as it is not populated but works fine in Firefox. Is this a jQuery bug? What is the work around for this. Thanks.
$("#abc option").each(function () {
alert'Option Text='+$(this)[0].text.toUpperCase());
if('DEFAULT' == ($(this)[0].text.toUpperCase())){
$(this).attr("selected","true");
}
});