我正在使用 qtip2 进行警报、确认、对话功能。现在我想作为(blockui插件)阻止页面视图,直到某些进程完成(例如ajax启动等)。为此,我正在使用以下代码
function blockPageDialog(content, title) {
    /* 
    * mainbody is the id of the body section of html
    */
    $('#mainbody').qtip(
                {
                    content: {
                        text: '<img src="/Content/images/ajax-loader.gif"/>'
                    },
                    position: {
                        my: 'center', at: 'center', // Center it...
                        target: $(window) // ... in the window
                    },
                    show: {
                        ready: true, // Show it straight away
                        modal: {
                            on: true, // Make it modal (darken the rest of the page)...
                            blur: false, // ... but don't close the tooltip when clicked
                            escape: false //dont hide on escape button 
                        }
                    },
                    hide: true, // We'll hide it maunally
                    style: {
                        classes: 'qtip-shadow qtip-rounded qtip-dialogue', // Optional shadow...
                        widget: true //themeroller
                    },
                    events: {
                        // Hide the tooltip when any buttons in the dialogue are clicked
                        render: function (event, api) {
                            // $('button', api.elements.content).click(api.hide);
                        }
                        // Destroy the tooltip once it's hidden as we no longer need it!
                        , hide: function (event, api) { api.destroy(); }
                    }
                });
}
我把上面的函数称为
blockPageDialog(imageToShowProcessing );
这是按预期阻止页面。
现在我想隐藏/销毁在进程完成时创建的阻塞对话框(例如 ajax 完成)或在按钮单击时创建的不是对话框的一部分(这就是为什么我在对话框中注释了按钮的代码)。
我尝试了以下事情
$('#mainbody').qtip('hide');
$('#mainbody').qtip('api').hide();
两者都不起作用。
我正在使用 jquery 1.9.1, qtip2 update (2.1) 来解决$.browser  错误
请指导我解决问题