gpt4 book ai didi

jquery-ui - jquery 对话框打开/关闭使用传输效果

转载 作者:行者123 更新时间:2023-12-04 20:54:37 27 4
gpt4 key购买 nike

我希望能够关闭此对话框并将其传输到一个对象

我试过用这个...不是运气

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" );

最佳答案

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();

});

}

});

关于jquery-ui - jquery 对话框打开/关闭使用传输效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5982777/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com