In some cases $(document.body).height() gets the same height as $(window).height()
(for example if you use the "foundation framework", because it sets the body height to 100% because of the "Off-canvas"-component)
This will cause the content to move slightly to the right, because the function returns 0.
Change $(document.body).height() to $(document).height() solves this issue.
In some cases $(document.body).height() gets the same height as $(window).height() (for example if you use the "foundation framework", because it sets the body height to 100% because of the "Off-canvas"-component) This will cause the content to move slightly to the right, because the function returns 0.
Change $(document.body).height() to $(document).height() solves this issue.