I have been trying to debug this issue for the past 3 hours and pulling my hair now. In my site when I load I get a undefined is not a function. I've been looking at the syntax and nothing seems to be wrong. Here is a link to my site. If you check the console, then it errors on the first load. Any idea?
1 Answer
Your plugin "Lazy Load" does not terminate with a semi colon, and as such cannot be combined into a single file with "malihu jquery custom scrollbars".
As the second plugin starts with (, the javascript engine will interpret that as a call to a function that it expects to be returned from the previous function call.
Add a ; at the end of the Lazy Load file.
Roughly, the code
/*
* Lazy Load - jQuery plugin for lazy loading images
*/
(function(a,b,c,d){ .... })(jQuery,window,document)
/*
== malihu jquery custom scrollbars plugin ==
*/
(function($){ ...})(jQuery);
is interpreted as
anonymousFunction(jQuery, window, document)(function($) { ... })
^ anonymous function returns undefined
but a function was expected
2 Comments
adit
this is weird.. I added a ; at the end of the lazy load file, but it didn't help..
David Hedlund
@adit: A browser cache issue perhaps? I no longer see the errors when visiting the site.