Timeline for How can I ScrollTop in SharePoint 2010 with JQuery
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 2, 2014 at 15:55 | comment | added | newuser007 | Could this be as this I would set on a publishing site page, and not the main page? In the source I see right after the <body> tag: <form name="aspnetForm" method="post" action="/MySite/MySitePublishingPage.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm"> | |
Aug 2, 2014 at 15:31 | comment | added | Tiago Duarte | the webpart im using is inside the main area. | |
Aug 2, 2014 at 13:17 | comment | added | Paul T. | Thanks for checking @tiago. This is puzzling to me. So you were able to place a webpart outside of the s4-workspace div? | |
Aug 2, 2014 at 11:33 | comment | added | Tiago Duarte | newuser's code animates and then immediately jumps into the top. I managed to reproduce the same behaviour. @paul's code is working for me, but not for the user, apparently, which may lead to custom stuff running on his side | |
Aug 1, 2014 at 23:28 | comment | added | Paul T. | I don't know what to say. Unless I can see the HTML markup, there is not much I can do. Good lick finding a solution | |
Aug 1, 2014 at 16:31 | comment | added | newuser007 | This is an OOB page, the ribbon still accessible, and scroll bar only show up under the ribbon. It seems to be some off-frame scrolling hence it rolls back once code executed. | |
Aug 1, 2014 at 12:57 | comment | added | Paul T. | I can't understand how $('html, body').animate() can be working. the OOB master page and the content of the page is not placed inside of the body tag... its inserted into an element with id of s4-workspace. I doubt you are using an OOB page or maybe there is something else on the page that has forced/inserted items into the body tag. Can you post the html markup of the page somewhere? Also, when you say that the code on your initial post works: is the Ribbon still accessible? do you get scroll bars on the browser window that spans entire height of the window - or only below the ribbon? | |
Aug 1, 2014 at 12:16 | comment | added | newuser007 | ootb master - ok; jquery - loaded, the first working version validates; document ready - same code used as the first, with the second animate java code | |
Aug 1, 2014 at 7:50 | comment | added | Tiago Duarte | +1 the code from @Paul works fine provided that you are using the ootb master page, jquery is loaded, and you are doing that on document ready. no delay required. now, if you are using custom branding, that's another problem | |
Jul 31, 2014 at 23:20 | comment | added | newuser007 | The first code scrolls at least - just scrolls back, this second code does not scroll at all. | |
Jul 31, 2014 at 23:06 | history | answered | Paul T. | CC BY-SA 3.0 |