15

How can I jump to the bottom of the page with jQuery?

I don't want a smoother animation, just to 'jump'. All the other questions on this site I found seem to involve an animation.

iConnor
  • 19,491
  • 13
  • 60
  • 93
Evanss
  • 20,529
  • 79
  • 252
  • 460

4 Answers4

31

This will do

$('html, body').scrollTop( $(document).height() );

scrollTop( vHeight );

iConnor
  • 19,491
  • 13
  • 60
  • 93
11

WITH ANIMATION

$("html, body").animate({ scrollTop: $(document).height() }, "slow");

WITHOUT ANIMATION

$('html, body').scrollTop( $(document).height() );
Deepak Biswal
  • 4,190
  • 2
  • 18
  • 37
1

$('#smthn').scrollTop(99999999999);

99999999999 is the max input for jquery and it can take element to the last scrolling position.

barrick
  • 846
  • 6
  • 12
Amir Rahman
  • 208
  • 2
  • 5
0

You can use an anchor tag for this, no need of jquery.

Put an anchor tag at the bottom of the page just before </body> tag. such as

<a name="pageend"></a>

And, from where on the page you can jump to the bottom, put another anchor tag just like this.

<a href="#pageend">Jump to page end</a>
Bibhu
  • 4,013
  • 4
  • 32
  • 61