Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 500
w3father Avatar asked Dec 09 '22 05:12

w3father


1 Answers

Try:

$(".ui-dialog-content").not(<selector for the dialog you don't want to close>).dialog("close");
like image 188
cicloon Avatar answered Jan 05 '23 00:01

cicloon