For IE8 I use this code which uses jQuery to animate a banner at the bottom of the page when the user scrolls to 250 or more. The problem is that this is extremely slow and has a huge delay, I believe this is because the animate event is firing so many times, I need a callback written in to .stop(); but I'm not sure how/where to put this. Any ideas?
} else {
$(window).scroll(function() {
if ($(this).scrollTop() < 250) {
if($("#carriage-promo").not(':animated')){
$("#carriage-promo").animate({
height: 0
},100);
}
} else {
if($("#carriage-promo").not(':animated')){
$("#carriage-promo").animate({
height: '40px'
},100);
}
}
});
}