sirxemic / jquery.ripples

Add a water ripple effect to your background using WebGL.
https://sirxemic.github.io/jquery.ripples/
MIT License
1.06k stars 417 forks source link

Uncaught TypeError: (intermediate value)(intermediate value) is not a function #54

Open alexrozario opened 6 years ago

alexrozario commented 6 years ago

Hello, This error occurred when using in wordpress. Uncaught TypeError: (intermediate value)(intermediate value) is not a function at jquery.ripples-min.js?ver=1.0.0:7 at jquery.ripples-min.js?ver=1.0.0:7 at jquery.ripples-min.js?ver=1.0.0:7

sirxemic commented 6 years ago

This error most likely has nothing to do with Wordpress. However, could you use the unminified version? Then we might get more useful errors and line numbers.

alexrozario commented 6 years ago

Hello, With unminified version $ is not defined. Is it conflicting?

Uncaught TypeError: $ is not a function at jquery.ripples-min.js?ver=1.0.0:16 at $ (jquery.ripples-min.js?ver=1.0.0:10) at jquery.ripples-min.js?ver=1.0.0:11 frontend.js?ver=1.0.0:351 Uncaught TypeError: jQuery(...).ripples is not a function at frontend.js?ver=1.0.0:351 at s (frontend.min.js?ver=2.2.5:2) at Object.doAction (frontend.min.js?ver=2.2.5:2) at i.runReadyTrigger (frontend.min.js?ver=2.2.5:2) at HTMLElement. (frontend.min.js?ver=2.2.5:2) at Function.each (jquery.js?ver=1.12.4:2) at a.fn.init.each (jquery.js?ver=1.12.4:2) at initHandlers (frontend.min.js?ver=2.2.5:2) at new i (frontend.min.js?ver=2.2.5:2) at HTMLDocument.init (frontend.min.js?ver=2.2.5:2)

sirxemic commented 6 years ago

Can you do console.log($, $ ? 'default' in $ : null) right before loading this library? If it outputs undefined, null then jQuery isn't loaded properly and the bug is out of the scope of this library. If however the second part of the output is true, then you might either want to unset $['default'] before loading the library (and reset it after), or replace the part e=e&&"default"in e?e.default:e in the minified file with e.

Sanktu commented 5 years ago

Had the same issue with wordpress. Depending on the version you use:

Working fine now with Wordpress.