Posted By

brianyang on 02/06/10


Tagged


Versions (?)

failproof google cdn


 / Published in: JavaScript
 

as the google load command is reported to be defunct this is a current failproof way to load jquery from the cdn

  1. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
  2. <script type="text/javascript">
  3. if (typeof jQuery == 'undefined') {
  4. document.write('<script type="text/javascript" src="jquery.js"><\/script>');
  5. }
  6. </script>

Report this snippet  

You need to login to post a comment.