How do I create a function like this that scrolls up the page bit-by-bit?
$('#down').click(function(){
$('html, body').animate({
scrollTop: $(this).offset().top += 20
});
return false;
});
This function works for scrolling down the page...I've a play trying to get it to scroll up the page but no success.
Any help is much appreciated, Thanks so you want to say that -=20 doesnt work ?
以上就是How do I create a function that scrolls up the page bit-by-bit, using JQuery?的详细内容,更多请关注web前端其它相关文章!