jparallax
jparallax copied to clipboard
Feature Request: Update params after initialization
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.
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.