Reputation: 230376
$("#dialog").dialog({
resizable: false,
height:140,
modal: true,
hide: {effect: "fadeOut", duration: 5000},
buttons: {
Save: function() {
alert("Saved");
$("#dialog").dialog( "close" );
},
Cancel: function() {
$("#dialog").dialog( "close" );
}
}
});
I'm using Chrome. Here's a demo.
When I close the dialog, it hides, but also shrinks.
I didn't tell it to shrink! Why does it do that?
Upvotes: 2
Views: 433
Reputation: 2345
$("#dialog").dialog({
resizable: false,
height:140,
modal: true,
hide: {effect: "fade", duration: 5000},
buttons: {
Save: function() {
alert("Saved");
$("#dialog").dialog( "close" );
},
Cancel: function() {
$("#dialog").dialog( "close" );
}
}
});
Upvotes: 1
Reputation: 160963
Because fadeIn and fadeOut are not valid values for the show and hide options. If you remove effect: "fadeOut"
, the result will be same. The valid option is fade
.
Upvotes: 2
Reputation: 66693
Using fade
instead of fadeOut
will solve the issue.
Check this: http://jsbin.com/alafez/4/edit#preview
Upvotes: 2