How to add jQuery to your WordPress Theme. The right way???

No, below is wrong. See my new post on precisely the correct way of using jQuery on your WordPress site.

I’m not going to get into whether or not you should use the jQuery that comes with WordPress or the one that Google offers cause I don’t know and don’t care. I’ve heard many arguments both ways citing load time, automatic updates, what if Google goes down and maybe it’s already loaded because of the visitors browser history, so choose a side and take your pick. In my opinion they both work. Anyway, below is the Google method. I also included one other script to load enqueue to show you how to add more than one script. So, if you have other custom scripts you want to add, copy the “other scripts” block and add whatever your theme needs.

function ineedmyjava() {
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', true);
wp_enqueue_script('jquery');

// other scripts...
wp_register_script(
'thumbslider',
get_bloginfo('template_directory') . '/js/jquery.easing.1.3.js',
array('jquery') );
wp_enqueue_script('thumbslider');

}
}

add_action('wp_enqueue_scripts', 'ineedmyjava');