Skip to content Skip to sidebar Skip to footer

$("body").scrolltop() Doesn't Update In Safari

I'm working on a website: http://beta.projektopia.se/ the body has several background-images that are updated on scroll like this: $(document).ready(function(){ $(document).sc

Solution 1:

The scrollTop jQuery method has been known to be problematic.

Depending on the browser, you may need to use $('html, body').scrollTop() or $(document).scrollTop() or $(window).scrollTop().

Solution 2:

For me, the problem was any kind of overflow property on html element. The moment I removed it, my .scrollTop() started working as it should. I still wanted global overflow-x: hidden property on my page, so I just set it on body element.

Post a Comment for "$("body").scrolltop() Doesn't Update In Safari"