I have been working on this error all day and cannot solve it.
You have a jQuery scrollTop script scroll animation that detects the value of $ (window) .scrollTop () and does some animation and if you click the scroll button up. $ (this) .click (function () {$ ("html, body"). animate ({scrollTop: 0}, "fast");});
This works fine. and I always get scrollTop value ... To →
When using a custom scrollbar for the browser, you must installed in css
html → overflow: hidden Body → position: absolute, overflow-y: scroll, overflow-x: auto
The html hierarchy is just normal html-> body-> div container → div content, etc.
Now that the browser scroll bar has been removed and you have your own custom scroll bar, the scrollTop value always returns zero.
Tried everything I can think of, no matter what other code I tried, the scrollTop value always returns zero.
So, nothing revives, and nothing scrolls back.
Does anyone know how to get the value when using custom * web browser -webkit-scrollbar to scroll up? *
source share