/ Published in: JavaScript
Grab jQuery library from Google's CDN this way its faster, burns Google's bandwidth and not yours. Also users will have this cached if other sites are using it as well.
Downside of course is Google's servers do go down. This script will check if its available on Google's servers otherwise fall back to your local version.
Downside of course is Google's servers do go down. This script will check if its available on Google's servers otherwise fall back to your local version.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="js/libs/jquery-1.6.2.min.js"><\/script>')</script>