Bootstrap Modal对话框无法在IE上运行

时间:2016-03-15 08:55:12

标签: javascript jquery html css twitter-bootstrap

我正在使用Bootstrap模式对话框来显示处理...消息,同时在后台进行长时间操作。 链接以供参考processing dialog

它与Chrome浏览器完全兼容,但不适用于IE。



$(function () {
        $("#upload").bind("click", function () {
            myApp.showPleaseWait();

            //Long operation includes multiple ajax calls.  

            myApp.hidePleaseWait()
        });
    });

var myApp;
myApp = myApp || (function () {
    return {
        showPleaseWait: function() {
             $('#pleaseWaitDialog').modal();
        },
        hidePleaseWait: function () {
             $('#pleaseWaitDialog').modal('hide');
        },
    };
})();

<html>
<body>
<input type="file" id="fileUpload" />
<input type="button" id="upload" value="Upload"/>
   <div class="modal hide" id="pleaseWaitDialog" data-backdrop="static" data-keyboard="false">
        <div class="modal-header">
            <h1>Processing...</h1>
        </div>
        <div class="modal-body">
            <div class="progress progress-striped active">
                <div class="bar" style="width: 100%;"></div>
            </div>
        </div>
    </div>
</body>
</html>
&#13;
&#13;
&#13;

浏览器控制台没有错误。

如果我从按钮单击事件中删除对话框隐藏,它也可以在IE中显示正常和对话框,但我想在完成长时间操作后隐藏处理对话框。

&#13;
&#13;
$(function () {
        $("#upload").bind("click", function () {
            myApp.showPleaseWait();

            //Long operation includes multiple ajax calls.  

            //myApp.hidePleaseWait() .... COMMENTED DIALOG HIDE...
        });
    });
&#13;
&#13;
&#13;

0 个答案:

没有答案