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

Already on GitHub? Sign in to your account

Feature Request: Update params after initialization #51

dtex opened this Issue Nov 1, 2012 · 1 comment


None yet
1 participant

dtex commented Nov 1, 2012

I would like to be able to pass in a new xorigin, yorigin, xparallax and yparallax after a parallax has been initialized.

My specific use case is to update the yorigin so I can cause some parallax layers to fly out of the viewport and other layers to fly in (it's a rotating marquee).

I'm currently using a fade to show hide layers.

dtex commented Nov 2, 2012

Never mind. Here's how it can be done:

jQuery('#myLayer').data().parallax.layer.setParallax ( xparallax || null, yparallax || null , xorigin || null, yorigin || null);

passing null leaves the value unchanged. If this is bad, please let me know, but it seems to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment