I have this code.
$(document).ready(function() {
$(\'#box\').hide();
$(window).bind(\'scroll\', function(){
if($(this).scrollTop() > 200) {
$(
Try using stop() before more animations are queued:
$(document).ready(function() {
$('#box').hide();
$(window).bind('scroll', function(){
if($(this).scrollTop() > 200) {
$("#box").stop().fadeIn(300);
}
else {
$("#box").stop().fadeOut(300);
}
});
});
See the documentation here: http://api.jquery.com/stop/