jquery.ripples icon indicating copy to clipboard operation
jquery.ripples copied to clipboard

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

Open alexrozario opened this issue 6 years ago • 4 comments

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

alexrozario avatar Oct 09 '18 13:10 alexrozario

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.

sirxemic avatar Oct 09 '18 15:10 sirxemic

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)

alexrozario avatar Oct 10 '18 04:10 alexrozario

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.

sirxemic avatar Oct 11 '18 13:10 sirxemic

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

  • minified: Line 8: "object" == typeof exports && "undefined" != typeof module ? t(require("jquery")) : "function" == typeof define && define.amd ? define(["jquery"], t) : t(e.$) to "object" == typeof exports && "undefined" != typeof module ? t(require("jquery")) : "function" == typeof define && define.amd ? define(["jquery"], t) : t(e.jQuery)

  • Non-minified version Line 10: (factory(global.$)); to (factory(global.jQuery));

Working fine now with Wordpress.

Sanktu avatar Aug 13 '19 16:08 Sanktu