gpt4 book ai didi

jquery淡出显示:none

转载 作者:行者123 更新时间:2023-12-03 22:59:58 25 4
gpt4 key购买 nike

为什么我的 jQuery 淡出不起作用。如果我将 Out 替换为 In,将 None 替换为 Inline,它将很好地淡入,但不会淡出。有什么想法吗?

$(this).find(".hover").fadeOut("slow").css({display:"none"});

最佳答案

问题是 .css({ display : 'none' }),您不需要此代码,因为 fadeOut 会在完成后将其隐藏。尝试使用此代码:

$(this).find(".hover").fadeOut("slow");

或者,如果您必须隐藏...请尝试此代码(fadeOut 的第二个参数是在 fadeOut 完成后运行的回调函数)

$(this).find(".hover").fadeOut("slow", function () {
$(this).css({display:"none"});
});

关于jquery淡出显示:none,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5160000/

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