Fallback for CDN hosted jQuery

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

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

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.