jQuery html attribute not working in IE

前端 未结 24 2714
[愿得一人]
[愿得一人] 2020-12-01 14:32

I am using country and state dropdowns in my form. Whenever the user selects the country in the dropdown, the respective states of the country will populate in the states dr

24条回答
  •  佛祖请我去吃肉
    2020-12-01 14:50

    As the solution is not mentioned here: I just had the same problem in IE8 when activating compatibility mode. The solution was to pass in a jQuery object to the .html() function like this:

    $("select#edit-state").html($(options));
    

    This was not a problem if the options were a jQuery object and also built as one. But in the above example, this should do the trick - at least for me it did.

提交回复
热议问题