[wp-hackers] google jquery; wp fall back?
liste at srpski.biz
Mon Oct 4 20:29:35 UTC 2010
For use of Google-hosted jQuery, best and full-featured solution for
WordPress is Use Google Libraries plugin. The only thing that it lacks is
You can see how it handles noconflict to maybe get idea how to add fall
2010/10/4 Barrett Golding <bg at hearingvoices.com>
> tried asking this in support, but no takers,
> so hope it's ok to ask here...
> the following is a rewite for WP of the code at:
> it grabs Google's CDN vers of jquery, but falls back to a local copy--
> for the few times when (and few countries where) Google is unavailable.
> <?php wp_enqueue_script( 'jquery' ); ?>
> i've de-/re- registered 'jquery' so it gets Google's vers,
> and above works fine inserted in <head> (of header.php, for instance):
> one slight prob is if above <script> is in footer.php,
> the fall back fails. otherwise, all seems to work well.
> so, I'm just wondering if anyone has a better solution,
> or sees some flaw in mine. thanks.
> <http://HearingVoices.com/ <http://hearingvoices.com/>>
> ~radio active transmissions~
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers