Callback functions ‘is not a function’ before running correctly
-
Hi.
Sorry to bombard with so many support requests!
I have my JS file being loaded after all the other JS files for the Ajax load plugin and one of your function snippets in there to check when the Ajax is complete each time it runs.
It returns as an
Uncaught Type error: $(...) is not a function
but then correctly runs and displays the Ajax Load More Complete! in the console.My code:
$(document).on('ready', function() { // loading animation and fade out $('.things #wrapper .row .loading').delay(10000).fadeOut("slow"); //isotope masonry of blocks $('#things-posts .alm-listing').isotope({ itemSelector: '.item', layoutMode: 'masonry', percentPosition: true, masonry: { columnWidth: 50 } }); }); //document ready $(function() { $.fn.almComplete = function(alm){ console.log("Ajax Load More Complete!"); }; })(jQuery);
Is there anything I’m doing wrong here? Or is there a different way to call the function so it doesn’t fail first then run okay after that?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Callback functions ‘is not a function’ before running correctly’ is closed to new replies.