Comments (8)
Would be awesome if the parallax items stop transforming if they are out of the viewport. That would make this script much lighter and faster. No more unnecessary calculations and paints.
from rellax.
I may have gotten confused with this... but surely parallax relative to the viewport is essential? If I have a large page, then anything at the bottom of the page is going to end up being complete out of place by the time you scroll to its position. is there another way of achieving this?
from rellax.
@toddpadwick Yup, we have the centering: true
feature which centers your element in the viewport when you scroll to that point.
from rellax.
Hey no worries glad you picked us! Feel free to email or tweet us when you launch your parallax project, we'll promote it!
from rellax.
I am sorry for posting this. I did figure out I had to change my HTML a bit to prevent lazyloading of images and it works beautifully now! Thank you for the plugin.
But is there a way to make it work with lazy loading images that have rellax applied to them? What happens is the first time a page loads and the images in the bottom of the feed are displaced by quite a bit when they come into viewport. But the second refresh of the same page renders them properly. So I am guessing it has to do with size information regarding the images?
from rellax.
Hey. Thanks for using the plugin :)
If you're loading all the image at once I think the solution for #52 could work for you.
If you're using lazy-loading, infinite scrolling, etc, you'll probably have to wait for #62 to get implemented. 😕
from rellax.
This is conceptually a great idea, but ultimately doesn't work in practice.
Because parallax by definition depends on your vertical scroll position, it doesn't make sense to not do the calculation on scroll. Even with 1,000 rellax elements, an iphone 5s doesn't stutter at all, so if your website is having performance issues I'd suggest optimizing elsewhere.
@johanneslamers Since we're using requestAnimationFrame and the elements are out of the viewport, painting is negligible.
from rellax.
haha I knew I'd got something wrong somehow as it seemed odd not having it. Thanks @moeamaya . Great plugin... so many over bloated or abandoned parallax plugins out there and also very few seem to have a good destroy function which was the main reason I chose yours. 👍
from rellax.
Related Issues (20)
- Seemingly incompatible with smooth-scroll libraries HOT 6
- parallax effect seems to break with changing window size of page. HOT 1
- Angular, Can't bind to 'data-rellax-percentage' since it isn't a known property of 'div'
- Feature request: speed as a function HOT 1
- Blazor incompatibility? HOT 1
- When applied to an svg element gets flipped?
- Start the animation before Rellax Item enters Viewport HOT 5
- Parallax for relative positioned element HOT 2
- Custom angle
- Efficiency Problem
- Callbacks and doing things with them HOT 1
- How to make rellax positions "predictable"? HOT 1
- Horizontal scroll-axis-x data-rellax-max-x and data-rellax-min-x number is not working. HOT 1
- Problem when used on the same page as JS accordion HOT 1
- Choppiness on Chrome
- USE WITH IONIC
- es6 version?
- x
- Positioning issues with long pages
- Positioning issues with long pages, translate values differ on page by page basis
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rellax.