Saturday, March 30, 2013

jQuery: Downloading

Downloading jQuery
jQuery, a JavaScript library, greatly simplifies JS programming by manipulating HTML using a very, very important function:

$().

It turns items inside the parentheses into jQuery objects.

Anyway, back to downloading jQuery. You can either download it to host the jQuery file yourself or download it from a CDN, or a Content Delivery Network.

To host jQuery on your own, go to this link at the official jQuery website. You can get the minified version, where all comments and whitespace is deleted. However, you can also get the uncompressed version, where comments and whitespace are put in, therefore you can learn from the gurus that made jQuery.

Also, jQuery is actually hosted at Google, so you are going to go to Google instead of jQuery's website.

If you want to get it from a CDN, you can reference it without downloading anything. These are the tags to get it from the CDN:

<script src='//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script>

for Google's jQuery (minified)

and <script src='//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js'></script> for Microsoft's minified jQuery.

No comments:

Post a Comment