Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when mouse enter the first time into the parallax or on first mouse move #87

Open
marcocostantino opened this issue May 8, 2015 · 4 comments

Comments

@marcocostantino
Copy link

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

@mainpart
Copy link

mainpart commented Sep 2, 2015

I have the same problem. I guess it needed to be triggered somehow manually

@sethkrasnianski
Copy link

Any solution to this one?

@patricknelson
Copy link

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: #89

patricknelson added a commit to patricknelson/jparallax that referenced this issue May 10, 2016
@patricknelson
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants