stop() with fadeIn() and animate()
Differences between stop() method using with fadeIn() and animate(). stop works only with animations.
by Craig Martin
HTML
<div style="float: left;">
<div id="roll_2">Hover area<br>[fadeIn, fadeOut]</div>
<div id="trig_2">Hi There!</div>
</div>
CSS
#roll, #trig, #roll_2, #trig_2 {
background: #0f0;
width: 150px;
height: 50px;
margin: 8px;
}
#trig, #trig_2 {
background: #f00;
}
JavaScript
$("#roll_2").hover(
function() {
$("#trig_2").stop().fadeIn();
},
function() {
$("#trig_2").stop().fadeOut();
}
);