我希望能够关闭此对话框并将其传输到对象
我试过用这个......不幸运
close: function() {
$(this).effect( 'transfer', { to: "#smpb_info_btn", className: "ui-effects-transfer" }, 500 );$(this).remove();
}
现在我正在努力......仍然没有运气
$PMinfo_Dialog.dialog({
autoOpen: true,
height: 250,
width: 600,
modal: false,
draggable: false,
resizable: false,
hide:{
effect:"transfer",
options:{from: "#smpb_info_btn", className: "ui-effects-transfer"},
speed:500
} ,
close: function() { $(this).remove();},
});
$PMinfo_Dialog.dialog( "open" );
答案 0 :(得分:3)
working jsFiddle demo 应该是您所需要的:
<强> HTML:强>
<div id="PMinfo">Hello</div>
<button id="smpb_info_btn">Info</button>
<强> CSS:强>
.ui-effects-transfer { border: 2px dotted gray; }
<强> JS:强>
$("#PMinfo").dialog({
autoOpen: true,
height: 250,
width: 600,
modal: false,
draggable: false,
resizable: false,
beforeClose: function() {
var $this = $(this);
$this
.dialog("widget")
.effect("transfer", {
to: "#smpb_info_btn",
className: "ui-effects-transfer"
}, 500, function() {
$this.remove();
});
}
});