Google CDN hosted jQuery with local fallback


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.