如何判断是否有任何jquery对话框打开? [英] How to tell if any jquery dialog happens to be open?
本文介绍了如何判断是否有任何jquery对话框打开?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
寻找一般情况下的解决方案,以确定当前是否打开了任何jquery对话框(有多个).尝试过:
Looking for a general case solution to determine if any jquery dialog (there are multiple) is currently open. Have tried:
$(".ui-dialog-content").dialog("isOpen") === true
$(".ui-dialog").dialog("isOpen") == true
$(document).dialog("isOpen") == true
$("*").dialog('isOpen') == true
没有成功.我希望".ui-dialog-content"能够正常工作,因为我显然可以使用该选择器关闭任何打开的对话框,但是没有.
without any success. I expected ".ui-dialog-content" to work, since I can apparently close any open dialog with that selector, but it does not.
推荐答案
您可以尝试
if($(".ui-dialog").is(":visible")){
//dialog is open
}
这篇关于如何判断是否有任何jquery对话框打开?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文