[英]Different animations for jQuery UI dialog close depending on button?
是否有可能(以合理的方式)根据单击的哪个按钮关闭带有不同动画的jQuery UI对话框?
$( "#dialog" ).dialog({
autoOpen: false,
show: "blind",
hide: "explode"
buttons: {
"Delete": function () {
... one animation here ...
$(this).dialog("close");
},
"Cancel" : function () {
... another here ...
$(this).dialog("close");
}
}
});
是的
$( "#dialog" ).dialog({
//autoOpen: false,
show: 'blind',
buttons: {
Delete: function () {
$( this ).dialog( 'option', 'hide', 'explode' );
$(this).dialog("close");
},
Cancel : function () {
$( this ).dialog( 'option', 'hide', 'blind' );
$(this).dialog("close");
}
}
});
实时示例: http : //jsfiddle.net/GLUHa/2/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.