Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>jQuery is already registered by WordPress, you should deregister it first.</p> <p>Be aware of what you're doing though. Serving it from a CDN is a good idea, but jQuery is loaded in WordPress in noconflict mode for a reason - you should make sure you do the same.</p> <p>See this article <a href="http://pippinsplugins.com/why-loading-your-own-jquery-is-irresponsible/" rel="nofollow">http://pippinsplugins.com/why-loading-your-own-jquery-is-irresponsible/</a> (which also includes code to achieve what you're trying to do, whilst telling you not to do it!)</p> <p>In case the link ever breaks, the code to achieve this is</p> <pre><code>function pluginprefix_load_scripts() { if ( !is_admin() ) { wp_deregister_script('jquery'); wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.9/jquery.min.js', false, '1.9'); wp_enqueue_script('jquery'); } } add_action( 'wp_enqueue_scripts', 'pluginprefix_load_scripts' ); </code></pre> <p>The main reasons to not do this are</p> <ol> <li>WordPress Loads jQuery in noConflict Mode</li> <li>Increased Support Load for Other Developers</li> <li>Themes Should Not Modify Core WordPress Behavior</li> <li>WordPress Updates the Bundled jQuery Version Frequently</li> </ol> <p>All valid points in my book :)</p> <p>There is a plugin that loads the Google library of jQuery in noconflict mode - a good solution to achieving what you want. <a href="http://wordpress.org/extend/plugins/use-google-libraries/" rel="nofollow">http://wordpress.org/extend/plugins/use-google-libraries/</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload