-
Notifications
You must be signed in to change notification settings - Fork 67
Cannot read property 'scrollTop' of undefined when using jQuery #11
Comments
I have the same issue. |
its work for me---
|
Hi guys, I landed here by looking for a way to hide my sub-header on scroll and found this codepen: http://codepen.io/anon/pen/rOXLzY It didn't work for me by failing at a similar line to where you guys are having the problem:
I wasn't using jQuery though. It worked for me by changing |
I have the same issue. |
This error is because of disabling jsscrolling - |
When using jQuery in a project the following line gives the error in the title:
var scrollTop = e.detail.scrollTop;
It has to be replaced with this line to work:
var scrollTop = e.originalEvent.detail.scrollTop;
An if statement has to be used to detect if jQuery is used but I don't know how to do that.
Update
This fix seems to work in iOS but not in Android. This can be seen in both chrome developer tools device mode and the actual devices.
The text was updated successfully, but these errors were encountered: