I'm popping up two jQuery UI modal dialogs. One of them is t开发者_开发百科riggered 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?
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.
Based on Zakaria's post, I think Drew meant this: http://jsfiddle.net/pinusnegra/KqK6n/
精彩评论