Loading jQuery from the Google CDN

// even more smart jquery inclusion :)
 add_action( 'init', 'jquery_register' );// register from google and for footer
 function jquery_register() {
     if ( !is_admin() ) {
         wp_deregister_script( 'jquery' );
         wp_register_script( 'jquery', ( 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' ), false, null, true );
         wp_enqueue_script( 'jquery' );
     }
 }
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s