Skip to content Skip to sidebar Skip to footer

Difference Between Jquery & Ajax

Anybody please list differences between Jquery & Ajax ?

Solution 1:

jQuery is a library that assists in doing hundreds of things, not the least of which is "Ajax". Ajax, which originally meant "Asynchronous JavaScript and XML" is nothing more than the asynchronous transmission of data from the client to the server. jQuery makes it easier to perform these asynchronous actions.

$.post( "/foo", { name: 'Jonathan' }, function( response ) {
    alert( response );
});

In the above example I can use jQuery (represented by $) to post data to the /foo directory on my server. I then handle the server's response as response, and when that response is received, I alert it to the user.

This example would qualify as Ajax, though jQuery does have an even more versatile respository of power within the $.ajax member.

Further Reading: http://api.jquery.com/category/ajax/

Solution 2:

jQuery is a JavaScript library providing a range of utility functions for dealing with the browser environment.

Ajax is a methodology of interacting with your server from a web page and updating the page without page refresh.

Asking what the difference between them is, is like asking what the difference is between a boat and tying knots. There may be a vague relationship (in that on boats, you tend to tie knots), but that's it...

Solution 3:

jQuery is a javascript framework. Ajax is "Asynchronous JavaScript and XML", and it can be performed easily using jQuery, allowing for javascript to make a web server request without refreshing the website.

Solution 4:

AJAX is a technique to do an XMLHttpRequest (out of band Http request) from a web page to the server and send/retrieve data to be used on the web page. AJAX stands for Asynchronous Javascript And XML. It uses javascript to construct an XMLHttpRequest, typically using different techniques on various browsers.

jQuery (website) is a javascript framework that makes working with the DOM easier by building lots of high level functionality that can be used to search and interact with the DOM. Part of the functionality of jQuery implements a high-level interface to do AJAX requests. jQuery implements this interface abstractly, shielding the developer from the complexity of multi-browser support in making the request.

Same SO Question: what is the difference between ajax and jquery and which one is better?

Hope this helps.

Post a Comment for "Difference Between Jquery & Ajax"