I have a jquery animate that will scroll to the bottom of the page.
I use this scroll animate code in my AJAX code.
the scroll animate affect works fine in Firefox but it doesn't work Google chrome for some reason!
could someone please advise on this?
this is my code:
$('html, body').animate({ scrollTop: $(document).height() }, 'slow');
and this is how I use it my AJAX:
<script type="text/javascript">
$(document).ready(function () {
function load() {
$.ajax({
type: "GET",
url: "MYFILE.php",
dataType: "html", //expect html to be returned
success: function (response) {
$("#messageme").html(response);
$('html, body').animate({ scrollTop: $(document).height() }, 'slow');
setTimeout(load, 800);
}
});
}
load();
});
</script>
any help would be appreciated.