JQuery Hide Option doesn't work in IE and Safari

后端 未结 7 2010
天命终不由人
天命终不由人 2020-11-30 09:58

I\'m trying to hide a few options in a dropdown box using .hide(). This works perfectly fine in firefox and chrome, but it doesn\'t work in IE and Safari. My original code i

7条回答
  •  暖寄归人
    2020-11-30 10:52

    You have to remove the option elements.. hiding them with display:none is not supported in many browsers.

    HIDE

    var elems = $(".wrapper1").remove();
    

    SHOW

    $('#candy').append(elems);
    

提交回复
热议问题