
As you maybe know, the new jQuery version (1.4) is out. But until the next update, your WordPress blog will still use the old jQuery version. This recipe will show you how to easily replace your current jQuery version by the newest 1.4 version.

As you maybe know, the new jQuery version (1.4) is out. But until the next update, your WordPress blog will still use the old jQuery version. This recipe will show you how to easily replace your current jQuery version by the newest 1.4 version.
Simply paste the following code on your functions.php file:
if( !is_admin()){
wp_deregister_script('jquery');
wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"), false, '');
wp_enqueue_script('jquery');
}
Thanks a lot to Sean Hayes for sharing this tip with me!
Also, please note that today I'm lauching a new site called Coupons for Bloggers and as you probably guessed, it is all about discount for all your blogging needs. Great news for WordPress fans, I got a whole lot of WordPress coupons, cush as Headway Theme, Digging into WordPress ebook, Gravity forms, etc...
Happy discount to all of you!
20 Responses
This tip rocks. Exactly what I need. Thanks for sharing, Jean!
It’s nice, but why we need the conditional !is_admin()?
One thing worth noting is that WP’s bundled jQuery is set to jQuery.noConflict() mode. If your site relies on the Prototype library, you’re going to wind up with a clash over the $ variable using the above code.
Wonderful ! I wil try to use it in mine now
Thankyou.And your new site Coupons for Bloggers is cool
what the function of jquery?
As our friend hasbulaqill said,
Some guys doesn’t know what is the function of jquery?,
In fact me too dont know exactly.
When you give these type of tutorials., please give a good explanation.
Thanks for your understanding.. any way keep rocking
yes..please explain
i doesnt get any answer yet
jQuery makes adding effects to your blog so easy, it requires pretty much 0 effort! Thanks for the tip, I’ll be sure to implement it on Inside the Webb
This is a good tip, but I would advise plugin authors to take care in utilizing this method. The folks at jQuery worked to ensure backwards compatibility with scripts designed to use jQuery 1.3, but undoubtedly some scripts will fail with the changes made. As Matt Wiebe pointed out, you also have to keep in mind that jQuery in wordpress is often used in noConflict mode, and using jQuery1.4 in the above method might break scripts using mootools, prototype, etc.
My recommendation is to allow users of your plugin to toggle whether or not they want to have jQuery1.4. Perhaps stay with the wordpress-bundled jQuery and have jQuery1.4 as an optional enhancement, and make clear the benefits that 1.4 will provide to people using your plugin.
Great tip ! Another advantage of this snippet is the external load of the jQuery, that saves bandwidth and help increasing the speed load.
Thank you
Nice Sharing. Infect i was looking
Why not just place direct link to jquery in header.php?
Very useful, Thanks for sharing.
Trackbacks: