Opposite of “scrollTop” in jQuery

前端 未结 8 947
情深已故
情深已故 2020-12-14 08:04

jQuery has a function called scrollTop which can be used to find the number of pixels hidden above the current page view.

I\'m not really sure why, but there is no s

相关标签:
8条回答
  • 2020-12-14 08:31

    If you want to Scroll Down (Opposite of “scrollTop”), try to use the vertical position on the argument. Like this:

    $(document).ready(function(){
        $("button").click(function(){
                               //position on pixeles
            $("body").scrollTop(1300);
        });
    });
    

    The top of the body, will be: $("body").scrollTop(0);

    0 讨论(0)
  • 2020-12-14 08:32

    You could try scrollTo plugin and do something like:

    $.scrollTo( document.height )
    
    0 讨论(0)
提交回复
热议问题