Title: Plugin Javascript trying to load before jQuery
Last modified: August 30, 2016

---

# Plugin Javascript trying to load before jQuery

 *  [farrukhsubhani](https://wordpress.org/support/users/farrukhsubhani/)
 * (@farrukhsubhani)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/plugin-javascript-trying-to-load-before-jquery/)
 * 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://wordpress.org/plugins/uk-cookie-consent/](https://wordpress.org/plugins/uk-cookie-consent/)

Viewing 1 replies (of 1 total)

 *  [Julie](https://wordpress.org/support/users/habannah/)
 * (@habannah)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/plugin-javascript-trying-to-load-before-jquery/#post-6561037)
 * Hi [@farrukhsubhani](https://wordpress.org/support/users/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](https://wordpress.org/plugins/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](http://www.wpbeginner.com/wp-tutorials/how-wordpress-plugins-affect-your-sites-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.

 * ![](https://ps.w.org/uk-cookie-consent/assets/icon.svg?rev=2567699)
 * [Termly - GDPR/CCPA Cookie Consent Banner](https://wordpress.org/plugins/uk-cookie-consent/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/uk-cookie-consent/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/uk-cookie-consent/)
 * [Active Topics](https://wordpress.org/support/plugin/uk-cookie-consent/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/uk-cookie-consent/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/uk-cookie-consent/reviews/)

## Tags

 * [enque](https://wordpress.org/support/topic-tag/enque/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [order](https://wordpress.org/support/topic-tag/order/)
 * [script](https://wordpress.org/support/topic-tag/script/)

 * 1 reply
 * 2 participants
 * Last reply from: [Julie](https://wordpress.org/support/users/habannah/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/plugin-javascript-trying-to-load-before-jquery/#post-6561037)
 * Status: not resolved