Sunday, 2 March 2014

How to include Jquery file on page?

How to include Jquery?

To include jQuery, first download the latest version of Jquery at www.jquery.com.

Extract it and add files to the project folder.

Include the jquery file in head section.

<head runat="server">
    <title> How to add Jquery</title>
    <script src="jquery-1.10.2.js" type="text/javascript"></script>
</head>

We can also add Jquery file from Content Delivery Network (CDN) where clients access data from one particular server.

Some of the Leading CDNs are,

1. Google CDN

<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>

2. Microsoft CDN

    <script type="text/javascript"
src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.4.1.min.js">
    </script>

By using CDNs, Clients can achieve better performance of retrieving data

No comments:

Post a Comment