Reputation: 4694
When using the JQueryUI dialog with the hide option added, the close event never fires. See my fiddle below to repro both ways.
Is there a workaround that I'm not aware of? I tried reordering them, but it didn't work. Any ideas?
http://jsfiddle.net/johntrepreneur/f4Ytr/3/
JAVASCRIPT (used for fiddle):
var $dialog = $('<div></div>').html('Using the hide dialog option ' +
'prevents the close event from firing. Clicking close does ' +
'nothing. Try commenting out the javascript line with the ' +
'hide effect to see the alert show up after clicking close.'
).dialog({
close: function () { alert('this will never show if hide option is active'); },
//hide: { effect: 'drop', direction: 'up' } //comment out to see alert show up
});
$dialog.dialog('open');
Upvotes: 1
Views: 424
Reputation: 4042
You're using jQuery UI 1.7.2 in your fiddle. If you replace it with the latest one (1.9.1 - //ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js) then your code works as expected. I don't know exactly what changed between those versions but there you go
Upvotes: 2