i usally first deregister to avoid duplicates, then register it and enqueue it like so:
function my_scripts_method() {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js');
wp_enqueue_script( 'jquery' );
}
add_action('wp_enqueue_scripts', 'my_scripts_method');
Hope this helps,
Sagive.
Related Posts:
- Correct Method to run scripts with dependencies without enqueue?
- Adding jQuery dependency prevents my script from enqueuing/loading
- Can’t move jQuery to footer
- Using multiple versions of jQuery while still calling it like WP likes
- Why isn’t jQuery 2.1 loading in the header?
- Move jQuery to the bottom of the page whilst keeping the WordPress jQuery
- WordPress error when replacing local jQuery by externally-hosted
- jQuery plugin not loading
- JS plugin script loading but not working
- How do I make script load after jquery?
- Make jQuery library load before plugin files
- How to control what jQuery version to include, with wp_enqueue_script
- Move WordPress native javascript to bottom of page?
- Best Practices for Seperating jQuery from HTML/PHP
- RequireJS in custom theme. Working Example
- How to get a jQuery script to run on a page?
- Add `datetimepicker` to form
- Deregister WordPress jquery on specific page
- Gravity Forms loading jquery
- Moving jQuery to the footer without using de-register in WordPress
- Asynchronous Javascript Loaders
- Use js script from one plugin in another plugin
- wp_enqueue_script won’t load in header?
- wp_enqueue_script and wp_register_script in theme not working
- wp_enqueuescript won’t load in footer even with true value set?
- How wp_enqueue_script works?
- How do I activate jQuery/script on demand?
- jQuery on Underscores menu
- Script won’t execute in the media manager
- When does WordPress automatically enqueue jQuery?
- How to properly add Bootstrap and JQuery Javascripts?
- wp_enqueue_scripts hook is not being called
- Override default jquery ui library with newer version
- Enqueuing javascript files
- enqueued script with jquery dependency not getting jquery
- Enqueue Google CDN jQuery in Footer
- How to undo deregister script and use local versions?
- ‘jQuery is not defined Error’ appearing in load-scripts.php
- Best way to include jQuery and fire with script at bottom of container
- Is it necessary to enqueue jquery?
- WordPress Ajax problem with undefined url
- Exclude some scripts from removing unique scripts from head function
- WordPress jquery files not being enqueued
- Searching multiple tags and adding jQuery dependant script onto page template?
- Why does javascript works only if logged in?
- How to enqueue jquery in admin and why is it not already there?
- Why is my WordPress loading old version of JQuery?
- wp_enqueue doesn’t work
- $.browser Undefined Seemingly Causing Faulty Page Display
- Unexpected script loading order
- Problem getting .js file to load via a plugin
- Using jquery-1.7.2.min.js instead of the wordpress jquery
- Trouble enqueueing jquery with custom theme
- Why should I deregister jquery?
- How to enque js script in footer that are not in .js file?
- Loading scripts on a single page plants the script in the footer
- registering new jQuery after wp_deregister_script() not working
- Loading a newer version of jQuery within WordPress
- jQuery will not work on page from snippet or file
- Enqueue script: link not working in page source
- Can’t execute jQuery before my script
- Why does deregistering jQuery cause other scripts not to load?
- jQuery is not defined, working on local server but not online
- Using WP functions inside javascript
- Including Older Version of jQuery for IE7/IE8
- How To Include JavaScript Files Only In Single Posts?
- wp_enqueue_script jquery and jquery ui not working
- wp_enqueue_script calling jQuery at different times for different browsers?
- Calling multiple scripts using wp_enqueue_script
- Bootstrap and jQuery error: $ is not defined
- Fire action after enqueue script
- WordPress not showing jQuery
- Get with jQuery the value of an ACF field
- Override parent theme deregister
- Uncaught ReferenceError: jQuery is not defined
- bundled jquery in theme js not working with wp_localize_script
- JavaScript code do not works on online server
- True parameter but jquery register in header and not in the footer with wp_register_script
- I can’t enqueue Suggest.js in frontend – not added
- File not enqueueing
- Enqueue script, taking no effect [closed]
- WordPress and Raty.js
- How to add JS snippet before closing tag?
- Can’t seem to get JQuery working (wordpress plugin)
- Enqueue javascript that inserts custom php widget into jQuery-constructed div
- Ajax Request with jQuery not happening
- jQuery AJAX add json2 dependency?
- jQuery does not appear to be enqueued on static homepage
- Uncaught TypeError: Object [object Object] has no method ‘dialog’
- Object [object Object] has no method ‘slides’
- How to make jQuery load AFTER plugin’s script?
- Monarch JS has not been loaded. After changing the $dep parameter, it start being loaded
- Can’t get jQuery to enqueue into post edit script
- javascript not loading in wordpress
- jQuery issue and wp_enqueue_script
- Using WP Ajax and jQuery to process multiple forms on the same page?
- bootstrap-slider.js by seiyria not working in wordpress
- How to enqueue script before jQuery? [duplicate]
- javascript and css not loading properly in WordPress site
- Making the Google Maps API non readable