jparallax
jparallax copied to clipboard
Problem when mouse enter the first time into the parallax or on first mouse move
Hi,
here's the example live, when mouse enter the first time the parallax block flickers, how can we solve?
Thank you again
The LINk where to see: http://h2osoft.it/ Parallax Version 1.1 jQuery 1.11.0
I have the same problem. I guess it needed to be triggered somehow manually
Any solution to this one?
Alright guys, I think I got this figured out! It wasn't easy (actually it was a bit painful due to the lack of code comments) but I reverse engineered this and figured out how to initialize each layer on page load so that it's starting at the correct origin (from the middle, for example) and then gravitates to the correct position as you move your mouse over the defined viewport (a.k.a. mouse port).
See my proof of concept/PR here: https://github.com/stephband/jparallax/pull/89
I also identified another issue with initialization where it will not actually properly render the parallax effect if your mouse happens to already be over the viewport upon initial page load. I've updated my PR to reflect that as well (could be buggy).