JQuery



                                                                            JQuery(what, where,why ,when,how)

Introduction:-
Jquery is  a a cross-platform javascript library designed to simplify the client-side scripting of HTML.jQuery Is  the most popular javascript library in use today.jquery is free,open-source software licensed under he MIT License.
Jquery’s syntax is designed to make it easier to navigate a document,select DOM element,create animation,handle events,and develop Ajax applications,jQuery also provides capabilities for developers to create plug-in on top of the javascript library.
This enables developer to create abstraction for low level interaction and animation,advance effective and high level,theme-able widget.The most popular approach to the jQuery library allow for creation of powerful,dynamic web page and web application.

Structure of j query:-



How jQery work:-
This  is a basic tutorial,designed to help you get started using  jQuery. if you don’t have a test page setup yet,started by creating the following t HTML page:

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>Demo</title>
</head>
<body>
    <a href="http://jquery.com/">jQuery</a>
    <script src="jquery.js"></script>
    <script>

    // Your code goes here.

    </script>
</body>
</html>


The src attribute inn the <script> element must point to a copy of jquery.download a  copy of jQuery from the downloading jQuery page and store the jQuery.js file in the same directory as your HTML file

Complete Example-

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>Demo</title>
</head>
<body>
    <a href="http://jquery.com/">jQuery</a>
    <script src="jquery.js"></script>
    <script>
 
    // Your code goes here.
 
    </script>
</body>
</html>


Callback and function:-
Unlike many other programming languages ,javascript enables you to freely pass  function around to be executed at a later time .A callback is a function that is passed as an argument to another function and is executed after its parent function has completed.callback are special because they patiently wait to execute until their parent finishes.

Callback without arguments:-
$.get( "myhtmlpage.html", myCallBack );

When $.get()  to finishes getting the page myhtmlpage.html,it executes the mycallback() fuction

Callback with argument:-
$.get( "myhtmlpage.html", myCallBack( param1, param2 ) );

The reason this is fails is that the code executes mycallback(param1,param2) immediately and then passes mycallback()’s return value as the second parameter to $.get().we actually want to pass the function mycallback(),not mycallback(param1,param2)’s return values(which might or might no be a function).
So how to pass in mycallback() and include its argument?

To offer executing mycallback() with its parameters ,you can use an anonymous function as a wrapper .note to use of function() {.The anonymous function does exactly one thing. Calls  mycallback(),with the values of param1 and param2.



$.get( "myhtmlpage.html", function() {
 
    myCallBack( param1, param2 );
 
});


When $.get() finish getting the page myhtmlpage.html,it executed the anonymous fuction,which executed mycallback(param1,param2)

Purpose of j query:
The purpose  is to make it much easier to use of javascript on your website
JQuery  library contains the following  features:-
1-HTML/OM manipulation
2-CSS manipulation
3-HTML event methods
4-effect and animation
5-ajax
6-utilities

Why jQuery ?:-
There are lots of other javascript framwork out there ,but jQuery seems to be most popular,and also the most extendable.

Six reasons to use  jQuery:-
1-jQuery promotes simplicity:-
2-jQuery element displays even when javascript is disabled
3-easily integrated with the visual studio IDE
4-jQuery make animated applications just like a flash
5-jQuery load page faster
6-jQuery can be SEO friendly
Many of the biggest companies on the web use jQuery,such as-
1-Google
2-Microsoft
3-IBM
4-Netflix

Why you need jQuery:-
Let’s recap some of the advantages  to using jQuery in your next e=web development project-
1-The price is right.the jQuery library is free
2-it’s light.since jQuery pushes content to the client,it therefore reduces the wait time for server response.plus,it’s smaller than flash,so it result is smoother  paybacks and less error
3-it works anywhere

Future of JQuery:-
In future your company will have to deliver content to a variety of different platforms, including desktops,tablets,and smartphones,not to be mention the advent of smart TVs and  other connected device.the 1-2 punch of HTML5and jQuery is one of the best solution for this type of development






Comments

  1. Great presentation Hari Prakash Yadav... keep it up👍

    ReplyDelete

Post a Comment

Popular posts from this blog

Data Binding in asp.net

The Psychology of Money (Vitamin "M")