I would like to mimic a standard JavaScript confirm() using a jQueryUI dialog. I was thinking of something like the following, but I am obviously not understanding how it should work. Any suggestions? Thank you
return $("#dialog-cancel").dialog("open");
$("#dialog-cancel").dialog({
autoOpen: false,height: 400,width: 350,modal: true,
open: function(event, ui){},
buttons: {'OK': function(){$(this).dialog("close");return true;},'CANCEL': function() {$(this).dialog("close");return false;}}
});