modify default settings .. and modify again
I'm working with a jQuery UI dialog and I wish to change the defaults
settings. I do that with the code:
$.extend($.ui.dialog.defaults, {
resizable : false,
draggable : false,
modal : true,
close : function() {
alert('close');
}
});
That's fine, but lets take a single dialog instance, and wish to add
a close event to default event.
The only way I find is:
$( 'form.ui-chart-dialog' ).dialog({
width : 600,
height : 420
}).bind('dialogclose', function(event, ui) {
alert('hey');
})
Now when I close the dialog, I recive an alert 'hey', than an alert
'close', as we expected.
My problem is that I find the "bind" method a little too verbose. Is
there any way to use the "close: function()" adding the two events?
Thank you, I hope that my horrible English will be understandable.
Davide