[wp-hackers] Overriding Default jQuery Script Generation?
Dan Gayle
dangayle at gmail.com
Thu Feb 5 20:40:03 GMT 2009
> I'm trying to write a plugin that uses jQuery and would like to get
> it from the Google AJAX hosting [1] using wp_enqueue_script() [2]
> like so:
>
> wp_enqueue_script('jquery',"http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js
> ",array(),'1.2.6');
>
> However, what is emitted as a response to the browser is:
>
> <script type='text/javascript' src='http://upsracing.loc/wp-includes/js/jquery/jquery.js?ver=1.2.6'
> ></script>
>
> Of course the scripts are the same but I'd like to get that tiny
> extra "oomph" from the liklihood someone already has the script
> cached from another site.
>
> Anyone know how do disable the default jQuery script generation so
> it will use the Google AJAX one? Thanks in advance.
+1
That's exactly the same issue that I was working on with our lead
programmer. He doesn't see the point in using Google's jQuery, but I
keep nagging him about it.
More information about the wp-hackers
mailing list