jQuery对话框没有第二次打开

时间:2012-03-12 15:54:31

标签: jquery jquery-ui

我发现this thread基本上和我有同样的问题。但他们的解决方案并不适合我。

这是我的代码:

$(document).ready(function() {

    // create the loading window and set autoOpen to false
    $("#loadingScreen").dialog({
        autoOpen: false,    // set this to false so we can manually open it
        dialogClass: "loadingScreenWindow",
        closeOnEscape: false,
        draggable: false,
        width: 460,
        minHeight: 50, 
        modal: true,
        buttons: {},
        resizable: false,
        open: function() {
            // scrollbar fix for IE
            $('body').css('overflow','hidden');
        },
        close: function() {
            // reset overflow
            $('body').css('overflow','auto');
        }
    }); // end of dialog 

});


function waitingDialog(waiting) {
    $("#loadingScreen").html(waiting.message && '' != waiting.message ? waiting.message : 'Bekleyin...');
    $("#loadingScreen").dialog('option', 'title', waiting.title && '' != waiting.title ? waiting.title : 'Yükleniyor');
    $("#loadingScreen").dialog('open');
}

谢谢...

1 个答案:

答案 0 :(得分:0)

只使用$("#loadingScreen").dialog('option' ....一次,然后根据需要多次拨打$("#loadingScreen").dialog('open')