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
Running multiple scenes at once #103
Comments
@farhoudz did you get anywhere with this? I'm considering this solution too. It won't work with relative bounds but if the CSS is set up right and parallax is invoked on a parent element it should work |
You need to create an array, and then loop all scenes: Set an array and select all the scenes as:
Then run a loop:
Later if and you want to be able to disable/enable all of them together then create a function for that as:
|
@Gil-Goldshlager thanks a lot, it really worked for me. 💯 |
Thanks a lot, I used swiper slide and doesnt work for every slide item parallax.js, but this solution worked for me |
I`m wondering how to get multiple scenes but in reactjs.. |
I have a one-page web project containing four sections and so far using your amazing library I have written this code before the closing body tag :
var firstScene = document.getElementById('first-scene');
var firstParallax = new Parallax(firstScene);
var secondScene = document.getElementById('second-scene');
var secondParallax = new Parallax(secondScene);
var thirdScene = document.getElementById('third-scene');
var thirdParallax = new Parallax(thirdScene);
var fourthScene = document.getElementById('fourth-scene');
var fourthParallax = new Parallax(fourthScene);
My question is that is it possible to call all for scenes in one new parallax ? also when I put this code in an external js file it does not run at all, why?
Thanks in advance
The text was updated successfully, but these errors were encountered: