2468 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $100+ on Envato Market
  • Has referred 100+ members
  • Has been a beta tester for an Envato feature
+2 more
digitalimpact says
@digitalimpact: Why not just modify where wp_enqueue_script() loads jQuery from?

You can do that easily by adding this to your theme’s functions.php file:

function redefine_jquery() {
    if (!is_admin()) {
        // comment out the next two lines to load the local copy of jQuery
        wp_deregister_script('jquery');
        wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', false, '1.3.2');
        wp_enqueue_script('jquery');
    }
}
add_action('init', 'redefine_jquery');

Thanks a lot Eight7Teen! :)

125 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $1+ on Envato Market
  • Has collected 100+ items on Envato Market
+2 more
Eight7Teen says

Hey, you should go back and re-read my previous reply… I had to edit it…

2468 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $100+ on Envato Market
  • Has referred 100+ members
  • Has been a beta tester for an Envato feature
+2 more
digitalimpact says
Hey, you should go back and re-read my previous reply… I had to edit it…

Yep, I figured the Google APIs link would go in there.

Thanks buddy!

125 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $1+ on Envato Market
  • Has collected 100+ items on Envato Market
+2 more
Eight7Teen says

no problem

242 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+2 more
ATLChris says

What I find a lot of people do, is load the wp_enqueue_script(), then add the script link to their js file, then load the wp_head(). This is wrong, you have to add your script link to the js file after wp_head(). See Below.

<?php wp_enqueue_script("jquery"); ?>
<?php wp_head(); ?>
<script language="javascript" src="../javascript.js" type="text/javascript"></script>

As for the no conflict, not need to define ”$j” as no conflict, just use “jQuery” instead of ”$”. Wordpress already has jQuery in no conflict mode if you use “jQuery” instead of ”$” or ”$j. Just my 2 cents on the matter.

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