In this article, I will explain Jquery fundamentals and introduction about jquery.

What is Jquery?

JQuery is a JavaScript library used to simplify client-side scripting, event handling, and animation on client side.

jQuery is not a language, It’s  a well written JavaScript code.

It was released in January 2006 by John Resig.

jQuery is light weighted and the slogan for Jquery is "write less, do more".

It’s free, open source software, licensed under MIT license.

The goal of jQuery is to make it much easier to use JavaScript on our website.

jQuery will run exactly the same in all major browsers, including Internet Explorer 6.

Microsoft includes Jquery on Ajax framework and MVC framework.

Features & Advantages:

Simple, Easy to use

Fast & Extensible

Improves Performance of the application

Handles complicated functionality with less coding

Helps to develop browser compatible pages

DOM Manipulation

Ajax Integration (Server side calls)

Handles Effects and Animations

Wide range of plugins available for various specific needs

How to use Jquery?

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

2. Extract it and add files to the project folder.

3. 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


How to Execute Jquery?

We can execute Jquery by the following ways

1       $(document).ready(function () {}; - Execute Jquery only when the page fully loaded

2      $(function () { }); - Execute Jquery when the page loads


1. $(function () { })It will not wait for the whole page to load completely.

<script type="text/javascript">
            $(function () {
                alert("Welcome to Jqueryjohn.com");
            });
</script>

2. $(document).ready(function () {}This method is best and safest way to execute Jquery

<script type="text/javascript">
        $(document).ready(function () {
            alert("Welcome to Jqueryjohn.com");
        });
</script>

0 comments:

Post a Comment

 
Top