Why AJS.$(window).scrollTop() always returns zero in Confluence?

Nishaat Rajabali
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 5, 2017

I am trying to get scroll position using AJS.$(window).scrollTop() in window.scroll callback function but this always returns zero. 

How do I get scrollTop() in Confluence? Do I need to get the scrollTop() from a particular element?

I am using Chrome.

1 answer

0 votes
Mirek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2020

Please check if changing the element like Melissa did on similar question is working for you too - https://community.atlassian.com/t5/Confluence-questions/Re-Why-is-AJS-window-scroll-not-firing-in-Confluenc/qaq-p/706092/comment-id/94464#M94464

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events