Any help would be appreciated, I have tried almost everything available on web to get the current scroll value in safari browser but its always returning 0. No matter if I select body, document, html, documentElement etc.(body).scrollTop() Leave a Comment. I am currently working on modsagency.com/home this page and Have you tried ( window).scrollTop() ?Sometimes the user old issue.scrollTop(0) not working in Chrome Safari. May be there is a problem with the animate?? Im using jQuery scrollTop() with a .click() event to take the user back to the top of the page. Im also using position:fixed to get the element to stay in the same place as it scrolls.css - jQuery .append() not working in IE, Safari, and Chrome. Is there a fail safe way to make sure the window will scroll to that div after the page refreshes? Again, the below does work in Firefox but only partially works in Chrome and Safari. Try. Var scrollPos ("body").scrollTop() Webkit browsers always render window/html scrollTop as zero. scrollTop() works just fine as an onclick but not as an onload eventAnybody ever have to do something like thisand/orknow anything more specific about how to make this work with Safari (works in FF and IE).
now reset back to the starting position window.scrollTo(0, startingY)(body).scrollTop((this).scrollHeight) you use this code ,i think it will work properly in IE and Firefox. Back to top button not working in Firefox and IE. window.setTimeout(function() (window).scrollTop(0) , 0) and it worked. Setting a delay greater than 0 is not neccesary, although that also worked.Tags: safari jquery google chrome scrolltop. The (window).scrollTop() works fine.I just had it 900px ,thats why I was not able to see the effect.When I changed it to be greater, it works.But to be on the safer side Ill also write a cross browser code suggested in the other link.Thank you all.