ImageJS and jQuery
loretoparisi opened this issue · comments
Supposed to put jquery in the Image I have the error
Uncaught TypeError: number is not a function
The GIF header is ok, the error is somewhere in the javascript closure of JQuery
GIF89a/*0;*/=0
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9//....
I started from a compressed version of jQuery 2.1.1 (jQuery minified) available on jQuery CDN
https://code.jquery.com/jquery-2.1.1.min.js
I'm going to look where this comes from. Thanks.
Adding a semicolon will probably fix that
GIF89a/*0;*/=0
;(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9//....
I wasn't able te reproduce this error but i still added a semicolon.
I'd be happy if you'd tell me how you executed the script so i can reproduce and check the other file types too.
This will produce an error (Uncaught TypeError: number is not a function)
GIF89a/*0;*/=0
(function(){alert('hi');})()
This not:
GIF89a/*0;*/=0
;(function(){alert('hi');})()
I changed the header to GIF89a/*0;*/=0;
and that worked for me, too. So you don't have to add a leading ;
to your code.
+1