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

jparallax can't handle window resizing #86

Open
wilk-polarny opened this issue Feb 17, 2015 · 1 comment
Open

jparallax can't handle window resizing #86

wilk-polarny opened this issue Feb 17, 2015 · 1 comment

Comments

@wilk-polarny
Copy link

Hi there,

I have a problem with jparallax - everything works fine until you try to resize the window or the viewport.
The images won't adjust to the new screen size and will jump around once you move the mouse over the mouseport.
I could not find a way to reset the offsets or to reset jparallax. I tried to call unparallax and parallax again after every successful window resize action (resizing finished), but it did not work - unparallax returns: "elem: undefined element". also calling parallax twice results in flashing images.

Is there any way to fix this?

I'm currently running the latest version together with JQuery 2.1. This problem appears in every webkit browser - I haven't tested it in IE as I am not running on Windows.

@Sicria
Copy link

Sicria commented Mar 11, 2015

Had the same problem, used the 'hacky' code below to fix it.

$('.parallax-layer')
            .css({top: 0, marginTop: 0, left: 0, marginLeft: 0})
            .parallax({mouseport: $(".parallax-port")});

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

2 participants