I created a website with a street parallax scene. See here for the archived version.
It works great on all major desktop browsers and Safari Mobile. It works great in Mobile Firefox and Chrome for Android Beta. However, the Android browser by default has problems with the scroll event. Let me be clear. Scrolling is not a problem. Scrolling div as needed. Scrolling event does not fire. I experience this problem both on cells and on ICS.
I am not interested in other mobile browsers, because for the sizes of mobile screens, usually there is no parallax scene; mediaqueries and conditional loading of JavaScript will take care of this. Responsive design and all this jazz.
Basically, I wrote the jallery () jQuery plugin, which positions each image based on its position and depth. This function is tied to a scroll event.
In the Android browser, this event only fires at the beginning of the next click , and not continuously.
OK, so I thought that maybe if I bind the function to events touchstart, touchmoveand touchend, I would solve the problem. No cigar. Other touch events are also tapped. Using the proposed workaround causes events to fire, but since I have to e.preventDefault(), scrolling (the entire point of the exercise) is disabled.
What if I just poll the position of the scene div relative to the div window? It turns out that the location information is updated only at the beginning of the next press .
I am at the end of my cable. Any help would be greatly appreciated.
source
share