For adding code blocks wrap the code in three backticks. Markdown should work. Provide a URL of your site/webpage if something is not working.
Thanks for this Sridhar. I wonder how to set up multiple Jarallax images with each a different scroll speed. A class doesn’t work. Can you help with this? Thank you!
Thanks for this Sridhar. I wonder how to set up multiple Jarallax images with each a different scroll speed. A class doesn’t work. Can you help with this? Thank you!
Just initialize based on the ID instead of class.
Ex.:
jarallax(document.getElementById('#section-2-60'), {
speed: 0.4,
});
jarallax(document.getElementById('#section-11-60'), {
speed: 0.7,
});
in step 2c.
Great mate.. One question.. How do you stop it from working on mobile.. I´ve tested in my mobile and the parallax effect does not work good it all
Change Step 2c Javascript to:
objectFitImages();
jarallax(document.querySelectorAll('.jarallax'), {
speed: 0.2,
disableParallax: /iPad|iPhone|iPod|Android/
});
Thanks