---
title: "JQuery Event function"  
description: "JQuery Event handlers are method that is called whenever any event is generated or raised in HTML control. For example if I will click on the button t"  
author: "Sachindra Singh"  
published: 2011-02-22  
updated: 2019-09-07  
canonical: https://www.mindstick.com/articles/462/jquery-event-function  
category: "jquery"  
tags: ["jquery"]  
reading_time: 2 minutes  

---

# JQuery Event function

JQuery Event handlers are method that is called whenever any event is generated or raised in HTML control. For example if I will click on the button then event will raise and all <label> element will hide from page.\

##### JQuery events:

```
$(document).ready(function(){})
```

This event raise one time html loading has finished.

```
$(document).click(function())
```

This event when raise if any element click like button.

```
$(document).focus(function())
```

This event when raise if any element is selected

```
$( selector).dblclick(function())
```

This event when raise if any element double click like button.

```
$(selector).mouseover(function())
```

This event when raise if mouse pointer over on element

##### Code:

```
<head runat="server">     <title></title>       <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>       <script type="text/javascript">         $(document).ready(function()         {             $("button").click(function()//click method will execute when button is clicked             {                $("label").hide();//label element will hide from page            });         });     </script>  </head><body>     <h2>         Information</h2>    Name--><label>         Tom</label>     <br />     <br />    Age--><label>         23</label>    <br />     <br />    City--><label>         Newyork</label>     <br />     <br />    School--><label>         St.Thomas</label>     <br />     <br />     <button>         Clear</button></body></html>
```

All label will be visible on the page as shown below:

![JQuery Event function](https://www.mindstick.com/mindstickarticle/af5957f6-7c75-4d69-8803-13f0fee3d01f/images/f6910fa0-91f1-441f-9b0d-117276c66cd5.png)

If I click on the **clear** button all label will hide from page as shown below:

![JQuery Event function](https://www.mindstick.com/mindstickarticle/af5957f6-7c75-4d69-8803-13f0fee3d01f/images/442c7559-a94f-45ce-bd76-0729c52714f4.png)

\

---

Original Source: https://www.mindstick.com/articles/462/jquery-event-function

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
