Menu Close

Jquery Events


In this blog, we will learn about jquery events. Jquery events are actions that are performed by the web pages when different users visit the web pages. An event represents the exact moment when something happens.

The following examples are some events.

  • Moving a mouse over an element
  • Form submission
  • Scrolling of the web pages
  • Web page loading
  • Clicking on button

Some events lists:

Mouse Events

  • click
  • dblclick
  • mouseenter
  • mouseleave

Keyboard Events

  • keyup
  • keydown
  • keypress

Form Events

  • submit
  • change
  • focus
  • blur

Document/Window Events

  • load
  • unload
  • resize
  • scroll

Note: The term “fires” is generally used with events. For example: The click event fires in the moment you press a key.

Syntax for jquery event method

In the jquery, most DOM events have an equivalent jQuery method. To assign a click event to all paragraphs on a page, do the following step:


Then you need to define what should happen when the event fires and to pass a function to the event:

 // action goes here!!


click() method

The click() method is used to handle the function of the html element when the user clicks on the html element. Follow the below snippet to learn the click() method.

<!DOCTYPE html>
<html lang="en">
    <title>Jquery click() method</title>
    <meta charset="utf-8">
    <script src=""></script>
    <meta name="viewport" content="width=device-width, initial-scale=1">
                alert("This paragraph was clicked."); 
    <p>Click on the text.</p>   
Posted in jQuery, Web Technologies

You can also read...