Skip to content Skip to sidebar Skip to footer

Css Zoom Interfering With Jquery Scrolltop

I'm creating a Website that, on Mobile Browsers, zooms out, as it's a fixed width website. Instead of using the viewport meta tags I've taken to the following: html, body { zoo

Solution 1:

jQuery's .offset().top is changing with the change of the window scroll when you have CSS zoom involved...

Take a look at my answer here https://stackoverflow.com/a/21048208/1090395 Hope it helps

Solution 2:

Faced with similar problem related to zoom and offset().Top. Tried to play with values in JS console and found this formula:

var scrollTopAnimateTo = ($(anchor).offset().top - $(".header").height()) * zoom + $(window).scrollTop() * (1 - zoom);

where zoom < 1.

Post a Comment for "Css Zoom Interfering With Jquery Scrolltop"