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
  • 8,751
  • 4
  • 25
  • 44
Jake
  • 3,172
  • 6
  • 36
  • 55

2 Answers2

1

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

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

ysrb
  • 6,643
  • 2
  • 28
  • 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
  • 32,389
  • 12
  • 66
  • 145