• I saw one of the issues you resolved in previous version by making this plugin JQuery dependent however I am not able to see that on current version.
    Version 1.8.2
    No Other plugins installed and I can see you have following

    //Enqueue jquery
    function catapult_cookie_jquery() {
        wp_enqueue_script( 'jquery' );
    	wp_enqueue_script( 'uk-cookie-consent-js', plugins_url ( 'js/uk-cookie-consent-js.js', __FILE__ ), array ( 'jquery' ), '1.8', true );
    }
    add_action('wp_enqueue_scripts', 'catapult_cookie_jquery');

    In our theme we have
    wp_register_script('jquery', get_template_directory_uri().'/js/jquery-2.1.4.min.js', null, "2.1.4", true);

    The generated Script is loaded before JQuery which causes a Javascript hickup and no show for cookie.

    What do you suggest.

    https://www.ads-software.com/plugins/uk-cookie-consent/

Viewing 1 replies (of 1 total)
  • Hi @farrukhsubhani,

    Have you been able to resolve this issue? If not, I may have a few suggestions. To me, it sounds like you need to change the load order for these scripts.

    You could perhaps do that with Plugin Organizer. (Tip: only try to control the plugins you need to control — if you try to control all of your plugins, there may be conflicts.)

    Another option would be to deregister the plugin’s jquery and reregister it in your theme files, placing it above the call to your theme’s jquery. This article explains the process really well, even though the purpose is different: How WordPress Plugins Affect Your Site’s Load Time.

    I hope this helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin Javascript trying to load before jQuery’ is closed to new replies.