jQuery CDN Fallback

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

Copy this code and paste it in your HTML
  1. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
  2. <script type="text/javascript">
  3. if (typeof jQuery == 'undefined')//jquery CDN fallback
  4. {
  5. document.write(unescape("%3Cscript src='jquery.1.5.1.min.js' type='text/javascript'%3E%3C/script%3E"));
  6. }
  7. </script>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.