pixelcog / parallax.js

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

Not Working in WordPress/Genesis Theme #207

Closed Nadareh closed 7 years ago

Nadareh commented 7 years ago

Hi everyone, I'm not sure what's wrong but I can't seem to get it work on the site I'm building. :'(

I have this: <div class="ebs-cta parallax-window" data-parallax="scroll" data-position="top" data-image-src="/wp-content/uploads/2017/08/ebs-cta-bg-parallax.jpg" data-natural-width="1400" data-natural-height="726">{..my other elements inside..}</div>

I don't know what's wrong. Any help? Thanks

Nadareh commented 7 years ago

It shows a blank image only. http://prntscr.com/gbrpsy

http://prntscr.com/gbrq0w

wstoettinger commented 7 years ago

data-attributes unfortunately don't work properly in the current version (see #183). this is a known bug and will be fixed for the next release. try calling:

$('.parallax-window').parallax();
wstoettinger commented 7 years ago

bug fixed with jQuery 3 support in #201