Installing jQuery into your web page

Including jQuery to your web page

There are two ways of installing jquery to your web page
  1. Downloading jQuery file from .
  2. Using jQuery form CDN (content Delivery Network ) .
1. Downloading jQuery File

 you  can download jQuery from

There are two versions of jQuery available for downloading:
    Production version - this is for your live website because it has been minified and compressed
    Development version - this is for testing and development (uncompressed and readable code)

after download jquery file you can reference its location to src attribute of <script> tag inside <head> tag .

<script type="text/javascript" src="jquery-1.9.1.min.js"></script>

2. Using jQuery fr0m CDN (content Delivery Network )

If you don't want to download and host jQuery yourself, you can include it from a CDN (Content Delivery Network). Both Google and Microsoft host jQuery.
Google CDN
   <script type="text/javascript" src="  /jquery.min.js"></script>

Microsoft CDN
   <script type="text/javascript" src=""></script>

Benefit of Using jQuery from CDN

It will be served from the other server. CDNs can offer a performance benefit by hosting jQuery on servers spread across the globe . Faster loading .

No comments:

Post a Comment