Question: I heard that AJAX use xml concept. But I had some doubt that whether the following code is JQUERY or AJAX. Find it for me. Give me differences between Jquery and AJAX

```
$(".changepass").click(function() {
   $(".loading").show();
   $(".block1").load("views/changepass.template.php", function(){ $(".loading").hide(); });
   return false;
 }

```

Answer: 
jQuery is a JavaScript library. AJAX, which means Asynchronous JavaScript and XML is a technique.

AJAX is... 

> 
> used on the client-side to create interactive web applications or rich Internet applications. With Ajax, web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page. 
> 
> 
> 

The `$(<selector>)` notation you are using is using the jQuery library. You can learn more about jQuery by visiting [the site](http://jquery.com/).

The `.load()` method in your code uses AJAX to *asynchronously* load whatever is being return by that PHP function to the `$(<selector>)`.

Source (added from voyager's comment):
[Jquery](http://en.wikipedia.org/wiki/Jquery)
[Ajax](http://en.wikipedia.org/wiki/Ajax_(programming))
The code is in jQuery and is used to load HTML from a remote file and inject it into the DOM. In this case you are injecting the HTML to an element with class 'block1'.

```
$(".changepass").click

```

> 
> attaches a clink event to element with
>  class 'changepass'
> 
> 
> 

See [**click**](http://docs.jquery.com/Events/click)

```
$(".loading").show();

```

> 
> show an element with class 'loading'
> 
> 
> 

See [**show**](http://docs.jquery.com/Effects/show)

```
$(".block1").load

```

> 
> loads an HTML to element with class
>  'block1' using AJAX.
> 
> 
> 

See [**load**](http://docs.jquery.com/Ajax/load)