Prinzhorn / skrollr

Stand-alone parallax scrolling library for mobile (Android + iOS) and desktop. No jQuery. Just plain JavaScript (and some love).
http://prinzhorn.github.io/skrollr/
MIT License
18.53k stars 3.5k forks source link

Skrollr with SuperSlides (hidden elements issue?) #809

Open filip-jk opened 8 years ago

filip-jk commented 8 years ago

Hello there,

I'm having some hard times connecting your awesome Skrollr plugin with a Superslides plugin. I try to achieve a simple parallax background effect. It works perfectly fine if there is just one container with a background image:

<div class="hero-fullscreen" data-top-bottom="background-position: 50% -340px;" data-top="background-position: 50% 0px;" data-bottom-top="background-position: 50% 200px;" style="background-image: url(http://some_image.jpg);">

However, when I try to add the exact same attributes to the Superslides plugin slides, the parallax effect works only with the very first slide while the others are broken. The code is:

`

` Here is what happens: http://d.pr/v/v7FM As you can see, the background position attribute changes properly only for the first slide (even though it's not currently the "active" slide with the "display:block;" parameter). Is this a known issue? Maybe it's me missing some extra option? Thank you! Regards, Filip