reblerebel
reblerebel

Reputation: 1

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

Upvotes: 0

Views: 657

Answers (3)

Adam Heath
Adam Heath

Reputation: 4753

Yes you can use the .stop() method, good examples on that page.

Upvotes: 1

jwatts1980
jwatts1980

Reputation: 7356

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

Upvotes: 1

Kristoffer Sall-Storgaard
Kristoffer Sall-Storgaard

Reputation: 10636

You probably want jQuery.stop: $tooltip.stop(true);

Upvotes: 1

Related Questions