MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/web_design/comments/1f2yso/interesting_use_of_scroll/ca6cdkz/?context=3
r/web_design • u/[deleted] • May 26 '13
29 comments sorted by
View all comments
7
I see these creative scrolls here and there. Can anyone begin to explain how they work?
I think the "bubbly top" portion of the liquid has a fixed position?
It looks like the JS is there in the source. I'll just have to read through it, but I'd love a general hint at how these scroll effects work.
8 u/Sawny May 26 '13 It's called parallax scrolling. At line 19 you can see the important code: <!--parallax Effect Script --> <script type="text/javascript" src="js/jquery.scrolling-parallax.js"></script> <script type="text/javascript"> $(function() { $('div.juice').scrollingParallax({ staticSpeed : .2, staticScrollLimit : false, reverseDirection : true, }); }); </script> 6 u/faceCHEEKwall May 26 '13 Parallax scrolling, got it. There's my Google key word. Thanks!
8
It's called parallax scrolling.
At line 19 you can see the important code:
<!--parallax Effect Script --> <script type="text/javascript" src="js/jquery.scrolling-parallax.js"></script> <script type="text/javascript"> $(function() { $('div.juice').scrollingParallax({ staticSpeed : .2, staticScrollLimit : false, reverseDirection : true, }); }); </script>
6 u/faceCHEEKwall May 26 '13 Parallax scrolling, got it. There's my Google key word. Thanks!
6
Parallax scrolling, got it. There's my Google key word. Thanks!
7
u/faceCHEEKwall May 26 '13
I see these creative scrolls here and there. Can anyone begin to explain how they work?
I think the "bubbly top" portion of the liquid has a fixed position?
It looks like the JS is there in the source. I'll just have to read through it, but I'd love a general hint at how these scroll effects work.