Response title
This is preview!
$(document).ready(function(){
// regular dialog box
$("#dialog").dialog({autoOpen: false, modal: true});
$("#dialog_link").click(function(){
$("#dialog").dialog("open");
return false;
});
// confirm box
if($.cookie("modal_confirm").length > 0 && $.cookie("modal_confirm")!="") {
$("body").prepend(''+$.cookie("modal_confirm")+'');
var g = $("#confirm");
g.html( g.html().replace(/\+/g," ") );
$("#confirm").dialog({
modal: true,
stack: true,
buttons: {
'OK': function() { window.location.replace(decodeURIComponent($.cookie("confirmGo"))); (this).dialog('close'); },
Cancel: function() { $(this).dialog('close'); }
},
close: function(){ $.cookie("modal_confirm",null); $.cookie("confirmGo",null);}
});
}
// alert box
if($.cookie("alert").length > 0 && $.cookie("alert")!="") {
$("body").prepend(''+$.cookie("alert")+'');
var f = $("#alert");
f.html( f.html().replace(/\+/g," ") );
$("#alert").dialog({modal: true, stack: true, buttons: {'OK': function() {$(this).dialog('close');}}, close: function(){ $.cookie("alert",null); }});
}
});
In this case, the alert modal wouldn't open while the confirm opens. If I move it in front of the confirm, then the alert would open but the confirm wouldn't open. Is this a jQuery UI problem? If so, is there a workaround?
Please help and thanks in advance.
© 2013 jQuery Foundation
Sponsored by and others.