I'm having some trouble getting the close button on my dialog box to work. I followed an example I found, but mine won't close. What am I doing wrong?
$(function() {
$('#message').dialog({
autoOpen: false,
bgiframe: true,
modal: true,
buttons: {
'Okay': function() {
document.location =
'http://www.google.com';
},
'Cancel': function() {
('#message').dialog('close');
}
}
});
$('button').click(function() {
$('#message').dialog('open');
});
});