Modal not opening in IE

后端 未结 6 1616
野性不改
野性不改 2020-12-01 21:16

I\'m trying to make modals pop up with info about certain places on a map. Here is the code:



        
6条回答
  •  再見小時候
    2020-12-01 21:50

    @scalen121 's answer worked for me (the fade animation causes it to break). However, I had a problem with the suggested code fixes..

    If you want to remove the fade animation just for IE (it doesn't seem to work even on IE11) but leave it for other browsers, then you can add the snippet:

    $(function () {
        var isIE = window.ActiveXObject || "ActiveXObject" in window;
        if (isIE) {
            $('.modal').removeClass('fade');
        }
    });
    

    Note that the above IE check is not the same as doing the old: $.browser.msie, which returns undefined on IE11 (tested with jQuery 1.8.3 and 1.7.2).

提交回复
热议问题