geosigno / simpleParallax.js

Easy Parallax Effect for React & JavaScript
https://simpleparallax.com
MIT License
1.81k stars 140 forks source link

Uncaught TypeError: simpleParallax is not a constructor #17

Closed mikeingz closed 5 years ago

mikeingz commented 5 years ago

Hello, When I try to use the last version (5.0.0), I get this error message:

Uncaught TypeError: simpleParallax is not a constructor

But when I use an older version (4.2.1), everything works as expected.

Is there something special to do to make the last version work?

Thanks

geosigno commented 5 years ago

Hi mikeingz, No you shouldn't have anything special to do to make that new version works. How do you use simpleParallax? via npm? or directly in a script tag? Can you provide some material so I can help. Thanks.

mikeingz commented 5 years ago

I am using in a script tag, with Wordpress. Here is a temporary page : http://auburn-guanaco.w6.wpsandbox.pro/parallax/

The script is loaded (in the footer), and I have just added an image, with the same example as in your page:

var images = document.querySelectorAll('img');
new simpleParallax(images);
jrgitwubs commented 5 years ago

Same issue here!

geosigno commented 5 years ago

This should be fixed with 5.0.1. Thanks for spotting that.