JQuery Hide Option doesn't work in IE and Safari

后端 未结 7 1993
天命终不由人
天命终不由人 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:43

    You're right. Some browsers just won't let you hide option elements. You'll likely need to remove them.

    Although perhaps a better (or at least an alternate) possibility would be to disable them.

    $(".wrapper1").prop('disbled', true);
    

提交回复
热议问题