gpt4 book ai didi

javascript - 对话框淡出离开边界框

转载 作者:行者123 更新时间:2023-11-28 07:56:26 27 4
gpt4 key购买 nike

我像这样创建 JQuery 对话框

  $(thisDialog).dialog({
open: function (event, ui) {
$(this).parent().children('.ui-dialog-titlebar').hide(); //hide titlebar.
},
position: [leftPos, topPos]
});

我尝试像这样淡出它,但无法重新打开它,并且仍然保留了一个边界框。

setTimeout((function () { $(thisDialog).fadeOut(1000, "linear", null) }), 2000);

这会删除边界框,但我无法重新打开它。

setTimeout((function () { $(thisDialog).parent().fadeOut(1000, "linear", null) }), 2000);

这允许我重新打开它,但它不会消失。我想要淡入淡出效果。

setTimeout((function () { $(thisDialog).dialog("close"); }), 2000);

最佳答案

使用内置选项隐藏(和显示):

$('#dialog').dialog({
hide:{
duration: 1000,
easing: 'linear',
effect: 'fade',
},
});

fiddle

关于javascript - 对话框淡出离开边界框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26024307/

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