Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

changing stack order of jQuery UI modal dialogs

I'm popping up two jQuery UI modal dialogs. One of them is triggered on the success of an AJAX function, so it usually comes up later, on top of the first dialog. I'd like to programmatically switch the stacking order of the two dialogs so that the first appears on top of the second. Trying to do this with the zIndex property and with dialog("moveToTop"), but neither seem to be having an effect. Suggestions?

like image 965
Drew Dara-Abrams Avatar asked Dec 02 '25 18:12

Drew Dara-Abrams


1 Answers

I realized a sample that should work for you: http://jsfiddle.net/kUYcw/.

In this example, if you remove the stack:false and stack:true options, the dialog d2 (second one) will appear first.

But, in the example I put in the link, you can see that I forced jQuery to display d1 first.

EDIT:

I've just updated the code. You can find it here: http://jsfiddle.net/DQYEW/3/.

As you can see, the dialog d2 will show when d1 calls the close event.

Regards.

like image 129
Zakaria Avatar answered Dec 05 '25 08:12

Zakaria



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!