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

stellar.js is initialized only after mouse scroll #137

Open
EvilDonkeyLondon opened this issue Dec 14, 2015 · 4 comments
Open

stellar.js is initialized only after mouse scroll #137

EvilDonkeyLondon opened this issue Dec 14, 2015 · 4 comments

Comments

@EvilDonkeyLondon
Copy link

I have a stellar parallax background image working fine on first page load. Then the main content, including the elements with the parallax background image, gets loaded into the page via a jquery load() function. In the callback function I do a

$.stellar('refresh');

That seems to make stellar refresh but it calculates the elements position only after I scroll the page causing the image to jump.

Here is a preview. From the home page please click on the second post, the one with title THIS IS A TITLE and you should notice that, when scrolling down the page, the full width background image jumps. If you inspect the element right after the ajax function ends, you won't see the background-position set. It does set only after the first mouse scroll.

http://dev.thinktravellive.com/

Thank you,
Jeff

@jsfrocha
Copy link

jsfrocha commented Apr 6, 2016

+1

Exactly the same thing happening here.

Have you found a fix for it ?

@masiorama
Copy link

+1

@hphoeksma
Copy link

Quick 'fix': set responsive to be false

@mcfry
Copy link

mcfry commented Nov 29, 2017

Setting responsive to false didn't work for me, but this did:

$(window).one('scroll',function() {
	$.stellar( 'destroy' );
	$.stellar({
	// yada
	});
});

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

5 participants