6 posts
  • Has been part of the Envato Community for over 1 year
anomy says
It’s a very poor practice to deregister WordPress’ built-in jQuery and load another specific version. Please use the WordPress default javascript library.

Is this reviewer saying I cannot use an up-to-date jQuery version? I must use 1.7.2 or whatever version WP rolls?

So how does one exactly load jQuery 1.9.1 into a WP theme?

Here is what I’m currently doing:
function my_jquery_enqueue() {
   wp_register_script('jquery', get_template_directory_uri() . '/assets/js/jquery.1.9.1.min.js', false, '1.0', 'all' );
add_action('wp_enqueue_scripts', 'my_jquery_enqueue');

My code relies on the recent jQuery to work…

520 posts Dream big
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Had an item featured in a magazine
  • Has referred 50+ members
+4 more
pixel-industry says

It’ really bad practice to deregister Wordpress jQuery. As I can see WP 3.5 has jQuery 1.8.3. Check if that version have methods you need.