WordPress by default load its own jQuery in your theme BUT using the following snippet in your theme’s functions.php file will load the library directly from Google CDN.
1 2 3 4 5 6 7 8 | function jquery_cdn() { if (!is_admin()) { wp_deregister_script('jquery'); wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', false, '1.8.3'); wp_enqueue_script('jquery'); } } add_action('init', 'jquery_cdn'); |
Snippet Source/Credit: WP Tips