Forcing newer jQuery
-
I’m hitting a brick wall with this one. I’m trying to use a newer version of jQuery (1.7.1) by unloading and reloading the script with this code, in my theme’s functions.php file:
function modify_jquery() { if (!is_admin()) { wp_deregister_script('jquery'); wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', false, '1.7.1'); wp_enqueue_script('jquery'); } } add_action('init', 'modify_jquery');When I try this locally I can see in Firebug that the new version is loaded. But when I upload to my server the default version is always loaded… Any idea of what I can try?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
The topic ‘Forcing newer jQuery’ is closed to new replies.