jparallax
jparallax copied to clipboard
unparallax() seems not to work
Hi,
I want to unparallax some layers when a user clicks a button.
I'm calling
jQuery('.parallax-layer').parallax({});
to init the parallax and
jQuery('.parallax-layer').unparallax(true);
to stopp the parallax. But it did nit stop. I already checked if the functions (jQuery.fn.unparallax = function(bool) and function unparallax(node, port, events) ) are called, but the second one throws an error:
Uncaught ReferenceError: elem is not defined jquery.parallax.js:415
unstyle jquery.parallax.js:415
(anonymous function) jquery.parallax.js:515
v.extend.each jquery.min.js:2
v.fn.v.each jquery.min.js:2
jQuery.fn.unparallax
Any idea?
Yeah, I have got some ideas. I can't look at it right away, unfortunately. It'll have to wait a few days.
On 23 January 2013 13:58, ghmicha [email protected] wrote:
Hi,
I want to unparallax some layers when a user clicks a button.
I'm calling
jQuery('.parallax-layer').parallax({});
to init the parallax and
jQuery('.parallax-layer').unparallax(true);
to stopp the parallax. But it did nit stop. I already checked if the functions (jQuery.fn.unparallax = function(bool) and function unparallax(node, port, events) ) are called, but the second one throws an error:
Uncaught ReferenceError: elem is not defined jquery.parallax.js:415unstyle jquery.parallax.js:415(anonymous function) jquery.parallax.js:515v.extend.each jquery.min.js:2v.fn.v.each jquery.min.js:2jQuery.fn.unparallax
Any idea?
— Reply to this email directly or view it on GitHubhttps://github.com/stephband/jparallax/issues/55.
Hi ,
Got the same issue, did you find a solution ?
Ron
[removed quick fix that did not always work]
I also found out that not all times are removed when you call unparallax(), one is left:
timer frame() 4 jquery.parallax.js:73
timer remove() 3 jquery.parallax.js:123
timer remove() 2 jquery.parallax.js:123
timer remove() 1 jquery.parallax.js:123
timer frame() 1
Should be unfreeze or unparallax?
This hasn't been fixed I think? The documentation says you should use jQuery('.parallax-layer').trigger('freeze'); with potentially some options, but yeah, looking at the code it seems like it's no longer the way to go. How should we proceed to unparallax layers and make them return to their initial positions?