I have a div the has overflow:scroll; on it, this means that the div needs to be scrolled to the bottom on page load.
I have used the scrollTo plugin and it works fine, but when I replace the content in the div and move it to an external page and then use:
$('document').ready(function()
{
$('#div').load("pagetoload.php").show();
});
It doesn’t scroll as it should?
This is my scrollTo code
$('#div').scrollTo( { top:800, left:0}, 800 );
When I put that code after the load it doesn’t work.
Any ideas?
You need to use the callback function of .load:
http://api.jquery.com/load/