-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No scroll for mobile advanced demo if cursor inside setPin #34
Comments
Hi! I never noticed this, because I mostly tried it on mobile. :) It seems the reason is that it no longer regards the element as a child of the parent container but of the body. But in this case we want to scroll the container and not the body. I will create a JS fiddle and post it on stackoverflow. I'll keep ya posted! UPDATE: |
Soooo this was fast! (stackoverflow rules) The easiest way is using this css for the fixed element: #fixed {
pointer-events: none;
} The problem is, that it is not supported by older browsers: A complete workaround requires javascript and I have tested this and it seems to work: $('#fixed').on('mousewheel DOMMouseScroll', function(event) {
$('#content').scrollTop($('#content').scrollTop() - (event.originalEvent.wheelDelta || event.originalEvent.detail*30));
}); See here for more details: http://stackoverflow.com/questions/13494850/a-way-to-scroll-an-underlying-div-when-mouse-is-on-top-of-a-fixed-div?answertab=votes#tab-top I will add the pointer events css to the examples. :) regards, |
hey,
In your example for mobile support, if the cursor is directly on the blue box and we scroll the page.. nothing happens. The cursor need to be outside the blue box while you scroll.
The problem seems to come from the fixed position and the overflow-y of the container. Do you have any solutions ? I need to do similar effect with full width..
http://janpaepke.github.io/ScrollMagic/examples/expert/mobile_advanced.html
The text was updated successfully, but these errors were encountered: