pixelcog / parallax.js

Simple parallax scrolling effect inspired by Spotify.com implemented as a jQuery plugin
MIT License
3.53k stars 840 forks source link

Add a possibility to disable parallax for all devices the way it is done for iOS #208

Closed simzikov closed 6 years ago

simzikov commented 7 years ago

I am looking for a way to give users a possibility to disable the parallax effect for any type of devices the way it is done for iOS via JS. I could have done it by changing the speed value to 1, but this works poor on browsers like Edge, so it'd be best to set the image as a background image for the [data-parallax] container like it is done for iOS and Android fix. Thanks.

wstoettinger commented 6 years ago

why not just prevent the library being initialized when the user doesn't want the parallax effect? you could also call $('.parallax-window').parallax('destroy'); in case it has been initialized already

anephew commented 5 years ago

@wstoettinger This breaks the block with the picture, after that just a white space. It is necessary that it be the same as on iOS and Android - the picture was in place, as background, but without parallax