2

I have an iframe, well it's exactly an iframe, its a div with a scroll overflow.

I want it to start scrolled to the bottom when the page is loaded

Is this possible with Jquery?

And if so, how?

Thanks!

Kokos
  • 9,051
  • 5
  • 27
  • 44
Jake
  • 3,326
  • 7
  • 39
  • 59

2 Answers2

1

Yes I did one before. I used the following library:

http://flesler.blogspot.com/2007/10/jqueryscrollto.html

ysrb
  • 6,693
  • 2
  • 29
  • 30
1

Take a look at this solution: Scroll to bottom of div?. Andsien's answer uses jQuery and is just one line of code; here's the code he gave wrapped in the document ready function:

$(document).ready(function(){
    $("#mydiv").scrollTop($("#mydiv")[0].scrollHeight);
});
Community
  • 1
  • 1
Alex
  • 34,699
  • 13
  • 75
  • 158