hi,
i want to position a banner while scrolling
the code is
$(window).scroll(function(){
offset = $(window).scrollTop()+80;
var h = $(window).height();
if(offset < 80 && offset < (h-800))
{
offset = 80;
}
$('#sidebar1').animate({top:offset}, 450);
});
the problem is the offset is dynamic and it changes while scrolling down, the banner goes beyond the window and while scrolling down it slides up slowly. i want a constant animation while scrolling up and down. i dont thing there is a attribute like bottom instead of top or is their event other than scroll to acheive it
Any help will be much appreciated