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_deregister_script('jquery');
   wp_register_script('jquery', get_template_directory_uri() . '/assets/js/jquery.1.9.1.min.js', false, '1.0', 'all' );
   wp_enqueue_script('jquery');
}
add_action('wp_enqueue_scripts', 'my_jquery_enqueue');

My code relies on the recent jQuery to work…

557 posts Dream big
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • 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.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by