Home › Forums › JavaScript › How to add jQuery to a framework? › Reply To: How to add jQuery to a framework?
September 1, 2013 at 7:01 am
#148705
Participant
There are a number of ways you can add jQuery to your project.
- Download it from jquery.com, FTP it to your server, and include it in the
<head>
, like:<script src="/your/path/to/jquery.js"></script>
– this is slower but reliable in that you always know it’ll be there - Use Google’s hosted version which is delivered from a CDN , like:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
– this is faster but it’s not on your server and some devs worry that Google might stop offering this service and if that happens you’re screwed - Combine both, and use Google CDN’s jQuery if it’s available, and fall back to a local copy if it is not – this is really the best of both worlds.