简体   繁体   English

javascript jquery淡入淡出

[英]javascript jquery fade in fade out

hey i have some fading tool-tips but the problem is when you roll over the buttons in a line it has to fade out complete before it can fade back in so in makes a sort of flashing this is the code 嘿,我有一些淡入淡出的工具提示,但问题是,当您将鼠标悬停在一行中的按钮上时,它必须完全淡出,然后才能淡入,因此闪烁的是代码

showbox:function($, $tooltip, e){
    $tooltip.fadeIn(this.fadeinspeed)
    this.positiontooltip($, $tooltip, e)
},
hidebox:function($, $tooltip){              
    if (!this.isdocked){
    $tooltip.fadeOut(this.fadeoutspeed)
    $tooltip.css({borderColor:'black'}).find('.stickystatus:eq(0)').css({background:this.stickybordercolors[0]}).html(this.stickynotice1)
    }
},

is there a way of fading out but if it starts fading back in without having to completely fading out thanks for any help im kinda a JavaScript noob thanks 有没有一种淡出的方式,但如果它开始淡入而不必完全淡出,谢谢您的帮助,有点像JavaScript的新手,谢谢

您可能需要jQuery.stop$tooltip.stop(true);

Check out the .stop() command. .stop().stop()命令。 http://api.jquery.com/stop/ http://api.jquery.com/stop/

是的,您可以使用.stop()方法,该页面上的很好的例子。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM