Anyone know how to automatically scroll down to footer section when a specified div
clicked using jquery ?
Asked
Active
Viewed 124 times
0

stackminu
- 791
- 2
- 9
- 24
-
actually you should do more research before asking ;) http://stackoverflow.com/questions/6677035/jquery-scroll-to-element – p0rter Jul 24 '12 at 10:45
-
here is an example of what you are looking for http://tympanus.net/codrops/2010/01/03/scrolling-to-the-top-and-bottom-with-jquery/ – Vinay Jul 24 '12 at 10:46
-
`$(window).scrollTop(99999);` 99999 or a high value – Imdad Jul 24 '12 at 10:49
3 Answers
1
you can do it by jQuery.ScrollTo by giving id to your footer section, check the demo.

Arun Rana
- 8,426
- 14
- 67
- 107
0
This should do it.
$('#clickableItem').bind('click', function () {
// get the distence left and top from the document left and top sides
var _offset = $('#footer').offset();
$(window).scrollTop(_offset.top);
};

bkwint
- 636
- 4
- 9
0
$("body").height()
will calculate the height of the window
and if you assign the height value to the scrollTop attribute of your html/body job is done
$('html, body').scrollTop($("body").height());

swapnilsarwe
- 1,290
- 1
- 8
- 13