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

Feature Request. the parallax should stop at 50% or halfway #276

Open prateekshaweb opened 5 years ago

prateekshaweb commented 5 years ago

Hi This is a feature request. can there be an option so that the Parallax stops at 50% or halfway and the image scrolls up normally.

I have a parallax which has Text on the left and on the right is an image of a man. I need that the text and the man should come exactly side by side. At 50% It does come exactly side by side, but as you scroll down, the text goes up and the man gets hidden by the parallax below.

Can you add an option so that at 50%... the parallax does not happen and the image goes up as normal

Currently I solved this issue with my website by adding this code if ( this.offsetTop >= 28 ) { this.offsetTop = 28 } just after this.visibility = 'visible'; this.mirrorTop = this.boxOffsetTop - scrollTop; this.mirrorLeft = this.boxOffsetLeft - scrollLeft; this.offsetTop = this.offsetBaseTop - this.mirrorTop * (1 - this.speed);

Can you add this feature?

wstoettinger commented 5 years ago

Hi @prateekshaweb!

I appreciate your suggestion! However, the usefulness will have to be further evaluated against the increasing complexity of the configuration.

I will leave this issue open and evaluate it when more people request such a feature.

thanks for your understanding!

jeffceriello commented 4 years ago

Hi, this feature would be greatly appreciated! I also need the parallax effect to stop and the element to scroll normally after a certain point.

Thanks