Open commonpike opened 9 years ago
This has been asked here http://stackoverflow.com/questions/28865362/use-skrollr-in-a-div-other-than-body
And somewhere else answered by Prinzhorn, too (woohee!). nevertheless, I'm adding it as an issue here, because it now is an issue to me ;-)
How do I use Skrollr on a page if I already use a different div to scroll (#scrollable) other than the body?
The answer is, you don't.
The code everything seems to rely on is _instance.getScrollTop(), which, for desktops is
return window.pageYOffset || documentElement.scrollTop || body.scrollTop || 0;
I wonder if it makes sense to hack something in there ?
have you read through #232?
No I didnt - and I still didnt until after I found all that out myself :-) You can mark this as a duplicate.
Thanks ! it 'seems to work' - lets see how far it goes.
This has been asked here http://stackoverflow.com/questions/28865362/use-skrollr-in-a-div-other-than-body
And somewhere else answered by Prinzhorn, too (woohee!). nevertheless, I'm adding it as an issue here, because it now is an issue to me ;-)
The answer is, you don't.
The code everything seems to rely on is _instance.getScrollTop(), which, for desktops is
I wonder if it makes sense to hack something in there ?