I try to scroll the SharePoint page after the page loaded.
Using the following code:
$(document).ready(function(){
$('html, body').animate({scrollTop: $('#WebPartWPQ1').offset().top}, 1000);
});
It starts scrolling the page, he problem is, that it scrolls back immediately.
Please help, how can I set in SharePoint 2010 not to scroll back after the page is loaded?
EDIT: I found the following code here:
$(document).ready(function() {
$('form[action="AreaNavigationSettings.aspx"]')
.closest('body')
.css('overflow', 'visible')
.find('#s4-workspace')
.css('overflow', 'hidden');
});
which removes the scrollbar from the right of '#s4-workspace', I am wondering how this code could be modified not to remove scrollbar, but scroll to position?