Weii
Weii

Reputation: 7

How to check Scroll Position with console?

I thought I could use the browser console to check the scrollTop position of an element. I haven't been able to do it though.

I tried window.scrollTop; but I couldn't get anything. Any suggestions?

Upvotes: 0

Views: 3968

Answers (1)

Danillo Corvalan
Danillo Corvalan

Reputation: 713

You can use either window.pageXOffset or window.pageYOffset
Check the window object

The method your are trying to use is from JQuery.

Upvotes: 2

Related Questions