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,997
  • 14
  • 62
  • 97
Evanss
  • 23,390
  • 94
  • 282
  • 505

4 Answers4

31

This will do

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

scrollTop( vHeight );

iConnor
  • 19,997
  • 14
  • 62
  • 97
11

WITH ANIMATION

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

WITHOUT ANIMATION

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

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

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

dyson
  • 866
  • 6
  • 12
Amir Rahman
  • 238
  • 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,053
  • 4
  • 33
  • 63