Here is my script:
$(document).ready(function () {
$('div').animate({
scrollTop: $('#content').offset().top
}, 'slow');
});
What I want is, the scroll should go at the bottom of the div. Is it possible?
Here is my script:
$(document).ready(function () {
$('div').animate({
scrollTop: $('#content').offset().top
}, 'slow');
});
What I want is, the scroll should go at the bottom of the div. Is it possible?
"What I want is, the scroll should go at the bottom of the div"
Now you scroll to the top of the div, because offset().top
calculates, where this div starts. If you want to scroll to the bottom of the div, you can simply add the height of the div too, like this:
scrollTop: $('#content').offset().top + $('#content').height()