Load latest version of jQuery from Google Libraries API and de-register Wordpress version


/ Published in: CSS
Save to your folder(s)

Load latest version of jQuery from Google Libraries API and de-register Wordpress version


Copy this code and paste it in your HTML
  1. if( !is_admin()){
  2.  
  3. wp_deregister_script('jquery');
  4. wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"), false, '1.7.2');
  5. wp_enqueue_script('jquery');
  6. }

URL: http://www.kevinleary.net/always-load-latest-version-jquery-wordpress/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.