I'm modifying the website (I got it the way it is right now, maybe even worse).

I'm getting the "Uncaught TypeError: jQuery(...) is not a function" on the website, the error appears in ajax function, as you can see on that site: http://4tour.pl/bochnia

I'm using Joomla 3.8.8, K2 2.8.0 and jQuery Easy plugin 2.2.0 (had a lot of errors because of multiple declarations of jQuery all over the site, scattered all over multiple files, and I have no idea where they are, so I installed that plugin) with jQuery+UI fix, noConflict and Migrate turned on.

Order of jQuery modules is: jQuery, migrate, noConflict, jQuery UI (unless I'm blind and can't find a stray declaration somewhere inside the code)

I already tried turning off modules of jQuery Easy (noConflict, disable mootools, different versions of migrate, turning on/off 'Fix Document Ready'), replacing 'jQuery.' to '$.' in that particular function but nothing seems to be working.

function ajax_results577() {    
        jQuery(".results_container").html("<p><img src='http://4tour.pl/media/k2/assets/images/system/loader.gif' /></p>");

        var url = "/bochnia/itemlist/filter?format=raw";
        var data = jQuery("#K2FilterBox577 form").find(":input").filter(function () {
                        return jQuery.trim(this.value).length > 0

            data: data + "&format=raw",
            type: "get",
            url: url,
            success: function(response) {   <-- Error appears here
                jQuery("#K2FilterBox577 div.acounter").hide();
                jQuery("html, body")

P.S. To clarify, multiple occurences of the same error are because the little navigation buttons are pulled via Ajax

  • Ok so firstly, if the snippet of code above loaded before or after jQuery? Secondly, have you wrapped the above code inside jQuery(document).ready(function() { ... });
    – Lodder
    Jun 15 '18 at 15:56
  • The error is on lines: jQuery("html, body") (jQuery(".results_container")); what's the purpose of these lines? seems like a typo. Jun 16 '18 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.