Check if jquery was loaded from CDN


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

Check if jquery was loaded from CDN. If not, load it from own website.


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

URL: http://habrahabr.ru/post/250663/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.