Reputation: 2900
I would like to make it so that when a jQuery UI dialog is closed, the document's focus
event is fired. This would preferably not be tied to each dialog but to the page itself whenever any dialog closes.
How can I do this?
Upvotes: 1
Views: 1946
Reputation: 5842
$("#image_div").dialog({
height:500,
width:600,
maxHeight: 700,
minWidth: 700,
modal: true,
title:'Crop Your Profile Image',
close: function() {
//your event
},
buttons : {...}
});
Upvotes: 0
Reputation: 19598
Did you checked this
$( ".selector" ).dialog({
close: function(event, ui) { ... }
});
Upvotes: 0
Reputation: 14318
$( ".selector" ).dialog({
close: function(event, ui) { $('#txt').focus(); }
});
Upvotes: 5