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

Issue with parallax container after browser resize #255

Closed ETCWeb closed 6 years ago

ETCWeb commented 6 years ago

I'm having an issue with the parallax div once I reach the end of my scroll (bottom), after the browser is resized smaller, then sized back to normal. Everything works fine until the browser is resized, then sized back to normal. At that point, it's like the parallax div stops maybe 50 pixels before it should, causing the content to extend over the top of it and the content in the next div (that's below it) to hang over into it. It seems like there may be a conflict with the slider I'm using (http://github.com/kenwheeler/slick). This slider is in the div just below the parallax div (which is the second parallax div on the page). If I remove the slider, everything works okay....or if I remove the parallax div, everything works okay.

Also, I'm using jquery-3.3.1.slim.min and bootstrap 4.1.0

ETCWeb commented 6 years ago

I was able to sort of resolve this by setting the div below the parallax to a white background. The page background is white, so I wasn't setting it, but now that div doesn't show the parallax background image when it scrolls over into it. The background image seems to stop when it hits the top of the browser (after the second resize), but it isn't nearly as noticeable of an issue now.