Double jquery – wp_deregister_script seems to be ignored
-
Hi there,
i´ve put some java scripts into my header section to add new functionalities. The scripts only seem to work if i include jquery.min.js from google like in the tutorial i used (http://ianlunn.co.uk/articles/recreate-nikebetterworld-parallax/).
Now the jquery.min.js from google seems to conflict with the jquery.js from wordpress, which breaks me plugins like nextgen gallery. The problem seems to be, that i call the script in my header instead of registering correctly.
So these two topics:
http://wordpress.org/support/topic/linking-to-jquery-the-right-way?replies=7
http://wordpress.org/support/topic/double-jquery-complete-mess?replies=11
(and several other say) that i have to put something like this in my functions.php:function add_google_jquery() { if ( !is_admin() ) { wp_deregister_script('jquery'); wp_enqueue_script('jquery','http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js',,'1.4.1',true); } } add_action('wp_print_scripts ', 'add_google_jquery');
That looks totally right and i found several topics that say similar things. But if i put this in the functions.php of my twenty-twelve child-theme, or even in twenty-twelve itself, nothing happpens.
Neither the first is stops loading, nor the second is included. I tried several code versions, always in child and parent theme (never both at the same time), but absolutly nothing happens. What am i doing wrong?
- The topic ‘Double jquery – wp_deregister_script seems to be ignored’ is closed to new replies.