When i'm scrolling down my functions work like they have too. But i want them to do the opposite when is scroll back to top. But how? This is what i got:
var $document = $(document)
$document.scroll(function() {
if ($document.scrollTop() >= 50) {
AnimateFunction();
}
});
function AnimateFunction() {
setTimeout(function() {
$("#LOGO").animate({height: '180px'}, 1);
$("ul").animate({top: '-14px'}, 1);
$("li").animate({fontSize: '8pt'}, 1);
$("#HB").animate({marginTop: '-10px'}, 1);
$("#HB").animate({height: '29px'}, 1).animate({width: '26px'}, 1);
}
)};
I hope someone can help me!