Comments (10)
A quick, but not perfect, solution could be overwriting the transform for smaller devices like this:
@media (max-width: 992px) { .rellax { transform: translate3d(0,0,0) !important; } }
from rellax.
@p-realinho and others. What do you guys think? I'm personally okay with adding a boolean option and re-using the landscape check to detect mobile, but I want to hear other's opinions.
from rellax.
Okay I think those are some good thoughts. I'll add some documentation to the README and close this issue later
from rellax.
Please don't provide a way to handle this feature such as many libraries do.
IMHO, the only requirement for any good library is to provide a destroy
and init
methods. It's then developer responsibility to handle the context where something happens or not.
And there's many easy ways to achieve this :
- For a resolution context, media queries with
matchMedia
or the help of amatchMedia
wrapper such as enquire.js. - For feature context, there's Modernizr or feature.js
- And if you wanna target directly user agent, there's also some good libraries for this.
from rellax.
i think this one goes with https://github.com/dixonandmoe/rellax/issues/58.
At least, I suggested this for disabling it on small viewports
from rellax.
Well, I guess @nlemoine makes a good point.
I don't see any methods to disable Rellax on mobile without bloating code (or how to detect mobile other ways?)
Maybe he is right. I need to do it myself and just remove rellax
class, for example.
from rellax.
Yea, the feature can be useful in some cases, but at the same time I do agree with @nlemoine and the repo's KISS approach ...
Maybe an example snippet on the readme would suffice?
from rellax.
@iamdubx, do lazy load of rellax.js with an init callback for screen.availWidth > 860px only
from rellax.
@radiocity I want it loaded on Desktops with any screen width, for example.
Viewports and loading of Rellax is unrelated.
The only issue on mobiles - is address bar behavior.
So I need to detect mobile, but not the screen width.
from rellax.
@iamdubx, okay. Make a lazy load with mobile device validation.
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.