Posted By

doodlemoonch on 02/12/10


Tagged

ajax google jquery optimization fallback CDN Hosted


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

doodlemoonch
SystemR
chippper
bostonbasso
jfherring


Google CDN hosted jQuery with local fallback


 / Published in: jQuery
 

  1. <!-- jQuery Google CDN hsoted with local fallback, weird doc.write slashes explained here http://www.codehouse.com/javascript/articles/external/ -->
  2.  
  3. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
  4. <script>
  5. if (typeof jQuery == 'undefined') {
  6. document.write('<script src="', 'js/jquery-1.4.1.min.js', '" type="text/JavaScript"><\/script>');
  7. }
  8. </script>

Report this snippet  

You need to login to post a comment.