hyunsupul / aesop-core

Open-sourced suite of components that empower interactive storytelling in WordPress.
http://aesopstoryengine.com
GNU General Public License v2.0
246 stars 56 forks source link

Mobile parallax #265

Open michaelbeil opened 9 years ago

michaelbeil commented 9 years ago

I wonder if we should think about integrating Skrollr into core, that's the library that Cover uses for mobile parallax.

Stand-alone parallax scrolling library for mobile (Android + iOS) and desktop. No jQuery. Just plain JavaScript (and some love). http://prinzhorn.github.io/skrollr

peiche commented 9 years ago

Aaaaactually, in Cover, Skrollr is disabled for touch devices. There are two different external js libs that I'm using: Headroom and Skrollr. Headroom hides and shows the sticky header, and Skrollr changes the background color of the header (so it blends in with the featured image at the top of a post/page, and stands out once you've scrolled past it).

I'm reading the mobile support documentation for Skrollr, and I see that they've changed their stance a bit. It used to be (and was the case when I first incorporated it) that they recommended disabling it entirely. (The example given was doing it by user agent, but I do it by checking for touchstart event support.) I might look into updating the lib for myself. :)