Title: jQuery entries in the source code
Last modified: August 21, 2016

---

# jQuery entries in the source code

 *  Resolved [GermanKiwi](https://wordpress.org/support/users/germankiwi/)
 * (@germankiwi)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/jquery-entries-in-the-source-code/)
 * Hi Jason,
 * I’ve just installed your plugin for the first time, in order to replace the WordPress
   jquery and jquery-ui links with the Google equivalents – seems to be working 
   great so far!
 * I have a couple of questions for you:
 * 1) In addition to changing the link URLs in the <head> section, the plugin also
   added this line:
 *     ```
       <script type='text/javascript'>try{jQuery.noConflict();}catch(e){};</script>
       ```
   
 * Can you explain what this is for or what it does?
 * 2) Before installing your plugin, my site had the following line at the very 
   end of the source code, just before the closing </body> tag – along with a few
   other lines for CSS and JS files from my theme and from some other plugins:
 *     ```
       <script type='text/javascript' src='http://www.ibcstuttgart.de/wp/wp-includes/js/jquery/ui/jquery.ui.core.min.js?ver=1.10.3'></script>
       ```
   
 * But your plugin has moved this line to the top, into the <head> section:
 *     ```
       <script type='text/javascript' src='//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js'></script>
       ```
   
 * I’m wondering why this is? I imagine there must be a good reason why the jquery-
   ui file is originally at the very end and not in the head section. Wouldn’t it
   be better if your plugin leaves it in the same location as it originally is?
 * Cheers!
 * [http://wordpress.org/plugins/use-google-libraries/](http://wordpress.org/plugins/use-google-libraries/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jason Penney](https://wordpress.org/support/users/jczorkmid/)
 * (@jczorkmid)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/jquery-entries-in-the-source-code/#post-4360819)
 * The extra script tag are to keep thing compatable with WordPress core. The jquery.
   js provided by WordPress has been modified to end with `jQuery.noConflict()`,
   so this does it’s best to ensure you get the same result when pulling jQuery 
   from google.
 * My plugin is not changing where it’s loading (or it shouldn’t be), but the WordPress
   script loader is. Note that jQuery-UI when coming from Google is a single file,
   and from WordPress it’s a bunch of small files. Same content, but the browser
   performance is better when it’s one file. There’s a chance this difference is
   interacting with some prerequisite of some other script, causing the script loader
   to determine it should load in the header.

Viewing 1 replies (of 1 total)

The topic ‘jQuery entries in the source code’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/use-google-libraries.svg)
 * [Use Google Libraries](https://wordpress.org/plugins/use-google-libraries/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/use-google-libraries/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/use-google-libraries/)
 * [Active Topics](https://wordpress.org/support/plugin/use-google-libraries/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/use-google-libraries/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/use-google-libraries/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jason Penney](https://wordpress.org/support/users/jczorkmid/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/jquery-entries-in-the-source-code/#post-4360819)
 * Status: resolved