2440 posts
  • Has been a member for 5-6 years
  • Exclusive Author
  • Europe
  • Bought between 10 and 49 items
  • Referred between 100 and 199 users
  • Sold between 100 and 1 000 dollars
  • Envato Studio (Microlancer) Beta Tester
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
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 1 and 100 dollars
  • United States
Eight7Teen says

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

2440 posts
  • Has been a member for 5-6 years
  • Exclusive Author
  • Europe
  • Bought between 10 and 49 items
  • Referred between 100 and 199 users
  • Sold between 100 and 1 000 dollars
  • Envato Studio (Microlancer) Beta Tester
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
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 1 and 100 dollars
  • United States
Eight7Teen says

no problem

242 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
  • United States
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.

by
by
by
by
by
by