How to close all jquery ui dialog before open a new dialog?
问题 I want to close all jquery dialogs before open a new dialog. I'm trying with following code. $(".ui-dialog-content").dialog("close"); It works but it too close new dialog too. please help me anyone. 回答1: Try: $(".ui-dialog-content").not(<selector for the dialog you don't want to close>).dialog("close"); 回答2: Just ran into this myself. I solved it like this. .dialog is a class that all the elements I made into dialogs share. $(".ui-dialog:visible").find(".dialog").dialog("close"); 回答3: How are