Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • jQuery Tutorial
  • jQuery Selectors
  • jQuery Events
  • jQuery Effects
  • jQuery Traversing
  • jQuery HTML & CSS
  • jQuery AJAX
  • jQuery Properties
  • jQuery Examples
  • jQuery Interview Questions
  • jQuery Plugins
  • jQuery Cheat Sheet
  • jQuery UI
  • jQuery Mobile
  • jQWidgets
  • Easy UI
  • Web Technology
Open In App
Next Article:
jQuery Event Methods Complete Reference
Next article icon

jQuery Event Methods Complete Reference

Last Updated : 18 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

An event refers to the actions performed by the site visitor during their interactivity with the website (or webpage). There can be various types of events such as

  • The user clicks on the button.
  • The user moves the mouse pointer over an image.
  • The user pressed any key from the keyboard, etc.

Syntax:

$(selector).method(function) 

Example:

html
<!DOCTYPE html> <html> <head>     <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script>     <style type="text/css">         #e5 {             width: 100px;             height: 100px;             border-radius: 0px;             background-color: aqua;         }     </style> </head> <body>     <p id="e1">Welcome.</p>     <p id="e2">Learn and Explore</p>     <p>         <input type="text" id="e3" value="jQuery is powerful!" />     </p>     <p id="e4" align="left">Geeks for Geeks</p>     <p>         <div id="e5"></div>     </p>     <button id="gfg1">Change Text</button>     <button id="gfg2">Change HTML</button>     <button id="gfg3">Change Value</button>     <button id="gfg4">Change Alignment</button>     <button id="gfg5">Change Shape</button>          <script type="text/javascript">         $("#gfg1").click(function() {             $("#e1").text("Geeks for Geeks");         });         $("#gfg2").click(function() {             $("#e2").html("<b>Enrich your Knowledge.</b>");         });         $("#gfg3").click(function() {             $("#e3").val("jQuery at Geeks for Geeks");         });         $("#gfg4").click(function() {             $("#e4").attr("align", "center");         });         $("#gfg5").click(function() {             $("#e5").css("border-radius", "50px");         });     </script> </body>  </html> 

Output: Before and After clicking on buttons.

The complete list of jQuery Events is given below:

Methods:

jQuery Event Methods

Description

jQuery bind() MethodThis is used to attach one or more event handlers for selected elements.
jQuery blur() MethodThe jQuery blur() is an inbuilt method that is used to remove focus from the selected element. 
jQuery change() MethodThe jQuery change() is an inbuilt method that is used to detect the change in the value of input fields. 
jQuery click() MethodThe jQuery click() is an inbuilt method that starts the click event or attaches a function to run when a click event occurs.
jQuery dblclick() MethodThe jQuery dblclick() is an inbuilt method that is used to trigger the double-click event to occur.
jQuery event.isDefaultPrevented() MethodThis is an inbuilt method that checks whether the preventDefault() method was called for the event.
jQuery event.isImmediatePropagationStopped() MethodThis is used to check whether this method was called for the event or not.
jQuery event.isPropagationStopped() MethodThis is used to check whether the object event.stopPropagation() is called or not.
jQuery event.preventDefault() MethodThis is used to stop the default action of the selected element to occur.
jQuery event.stopImmediatePropagation() MethodIn jQuery used to stop the rest of the event handlers from being executed for the selected element. 
jQuery event.stopPropagation() MethodThis  is used to stop the windows propagation
jQuery focus() MethodThis is used to focus on an element. The element gets focused by the mouse click or by the tab-navigating button. 
jQuery focusin() MethodThe jQuery focusin() is an inbuilt method that is used to gain focus on the selected element. 
jQuery focusout() MethodThe jQuery focusout() is an inbuilt method that is used to remove focus from the selected element. 
jQuery hover() MethodThis is used to specify two functions to start when mouse pointer move over the selected element.
jQuery Keydown() MethodThis is used to trigger the keydown event whenever User presses a key on the keyboard.
jQuery keypress() MethodThe jQuery keypress() method triggers the keypress event whenever browser registers a keyboard input.
jQuery keyup() MethodThis is used to trigger the keyup event whenever the User releases a key from the keyboard. 
jQuery load() MethodjQuery load() method is a simple but very powerful AJAX method. 
jQuery mousedown() MethodThis is an inbuilt method that works when the left mouse button is pressed down over the selected element. 
jQuery mouseenter() Method This is an inbuilt method that works when the mouse pointer moves over the selected element. 
jQuery mouseleave() MethodThis is an inbuilt method that works when the mouse pointer leaves the selected element. 
jQuery mousemove() MethodThis is an inbuilt method that is used when the mouse pointer moves over the selected element. 
jQuery mouseout() MethodThis is an inbuilt method that is used when the mouse pointer moves out from the selected element. 
jQuery mouseover() MethodThis is an inbuilt method that works when the mouse pointer moves over the selected elements. 
jQuery mouseup() MethodThis is an inbuilt method that works when the mouse left button is released over a selected element. 
jQuery on() MethodThis is used to attach one or more event handlers for the selected elements and child elements in the DOM tree.
jQuery one() MethodThe jQuery one() method is an inbuilt method that attaches one or more event handlers for the selected element.
jQuery ready() MethodThe jQuery ready() method helps to load the whole page and then execute the rest code.
jQuery resize() MethodThe jQuery resize() method is an inbuilt method that is used when the browser window changes its size. 
jQuery scroll() MethodThe jQuery scroll() is an inbuilt method that is used to user scroll in the specified element.
jQuery select() MethodThis is used when some letters or words are selected (or marked) in a text area or a text field. 
jQuery submit() MethodThe jQuery submit() method is used to submit events or attaches a function to run when a submit event occurs. 
jQuery trigger() MethodThe jQuery trigger() method is a method that is used to trigger a specified event handler on the selected element. 
jQuery triggerHandler() MethodThe jQuery triggerHandler() Method is used to trigger a specified event for the selected element. 
jQuery undelegate() MethodThis is used to remove the specified event handler from the selected element.

Properties:

jQuery Properties

Description

jQuery event.currentTarget PropertyThis is used to return the current DOM element within the event bubbling phase.
jQuery event.data PropertyThis is used to contain the optional data which is passed to an event method.
jQuery event.delegateTarget PropertyThis is used to return the element where the currently-called jQuery event handler was attached
jQuery event.namespace PropertyThe jQuery event.namespace property is used to return the custom namespace whenever the event is triggered.
jQuery event.pageX PropertyThis is used to find the position of the mouse pointer relative to the left edge of the document.
jQuery event.pageY PropertyThis is used to find the position of the mouse pointer relative to the top edge of the document.
jQuery event.relatedTarget PropertyThis is used to find which element is being entered or gets exited on mouse movement.
jQuery event.result PropertyThis is used to find the last and previous values returned.
jQuery event.target PropertyThis is used to find which DOM element will start the event.
jQuery event.timeStamp PropertyThis is used to measure the difference in milliseconds between the time of the event created by the browser and January 1, 1970.
jQuery event.type PropertyThis is used to return which event type is started.
jQuery event.which PropertyThis is used to return which keyboard key or mouse button was pressed for the event.

Next Article
jQuery Event Methods Complete Reference

V

Vishal_Khoda
Improve
Article Tags :
  • Web Technologies
  • JQuery
  • jQuery-Events
  • jQuery-Propertie
  • jQuery-Methods

Similar Reads

    jQuery Tutorial
    jQuery is a lightweight JavaScript library that simplifies the HTML DOM manipulating, event handling, and creating dynamic web experiences. The main purpose of jQuery is to simplify the usage of JavaScript on websites. jQuery achieves this by providing concise, single-line methods for complex JavaSc
    8 min read
    Getting Started with jQuery
    jQuery is a fast lightweight, and feature-rich JavaScript library that simplifies many common tasks in web development. It was created by John Resign and first released in 2006. It makes it easier to manipulate HTML documents, handle events, create animations, and interact with DOM(Document Object M
    4 min read
    jQuery Introduction
    jQuery is an open-source JavaScript library that simplifies the interactions between an HTML/CSS document, or more precisely the Document Object Model (DOM). jQuery simplifies HTML document traversing and manipulation, browser event handling, DOM animations, Ajax interactions, and cross-browser Java
    7 min read
    jQuery Syntax
    The jQuery syntax is essential for leveraging its full potential in your web projects. It is used to select elements in HTML and perform actions on those elements.jQuery Syntax$(selector).action()Where - $ - It the the shorthand for jQuery function.(selector) - It defines the HTML element that you w
    2 min read
    jQuery CDN
    A Content Delivery Network (CDN) is a system of distributed servers that deliver web content to users based on their geographic location. Including the jQuery CDN in your project can improve the performance, enhance reliability, and simplify maintenance.What is a jQuery CDN?A jQuery CDN is a service
    4 min read

    jQuery Selectors

    JQuery Selectors
    What is a jQuery Selector?jQuery selectors are functions that allow you to target and select HTML elements in the DOM based on element names, IDs, classes, attributes, and more, facilitating manipulation and interaction. Syntax: $(" ")Note: jQuery selector starts with the dollar sign $, and you encl
    5 min read
    jQuery * Selector
    The jQuery * selector selects all the elements in the document, including HTML, body, and head. If the * selector is used together with another element then it selects all child elements within the element used. Syntax: $("*")Parameters: *: This parameter is used to select all elements.Example 1: Se
    1 min read
    jQuery #id Selector
    jQuery is an open-source JavaScript library that simplifies the interactions between an HTML/CSS document, or more precisely the Document Object Model (DOM), and JavaScript. Elaborating on the terms, it simplifies HTML document traversing and manipulation, browser event handling, DOM animations, Aja
    1 min read
    jQuery .class Selector
    The jQuery .class selector specifies the class for an element to be selected. It should not begin with a number. It gives styling to several HTML elements. Syntax: $(".class") Parameter: class: This parameter is required to specify the class of the elements to be selected.Example 1: In this example,
    1 min read

    jQuery Events

    jQuery Events
    jQuery events are actions or occurrences that happen on a web page, such as clicks, hover, or keypress. jQuery provides methods to handle and respond to these events with ease. jQuery events are used to create dynamic web pages. Syntax: $(selector).method(function)Here We will explore some basic eve
    4 min read
    jQuery bind() Method
    The jQuery bind() method is used to attach one or more event handlers for selected elements. This method specifies a function to run when an event occurs.  Syntax$(selector).bind(event, data, function);ParametersIt accepts three parameters that are described below: event: This is an event type that
    2 min read
    jQuery blur() Method
    jQuery blur() is an inbuilt method that is used to remove focus from the selected element. This method starts the blur event or it can be attached a function to run when a blur event occurs.  Syntax:$(selector).blur(function)Parameters: It accepts an optional parameter "function".  jQuery examples t
    1 min read
    jQuery change() Method
    The jQuery change() method is used to detect changes in the value of form elements like <input>, <select>, or <textarea>. It triggers a specified function when a user modifies the input or selects a different option.Syntax$(selector).change(function)Parameters : It accepts an optio
    2 min read

    jQuery Effects

    jQuery animate() Method
    The animate() method is an inbuilt method in jQuery which is used to change the state of the element with CSS style. This method can also be used to change the CSS property to create the animated effect for the selected element. Syntax: (selector).animate({styles}, para1, para2, para3); Here "select
    2 min read
    jQuery clearQueue() Method
    The jQuery clearQueue() method removes all items from the queue that have not yet been run. Note that when a function has started to run, it runs until it is completed. Syntax: $(selector).clearQueue(name); Here "selector" is the selected element. Parameter: It accepts a parameter "name" which is th
    2 min read
    jQuery delay() Method
    jQuery delay() method is an inbuilt that is used to set a timer to delay the execution of the next item in the queue.  Syntax:$(selector).delay(para1, para2);Parameter: It accepts two parameters which are specified below: para1: It specifies the speed of the delay.para2: It is optional and specifies
    2 min read

    jQuery HTML/CSS

    jQuery addClass() Method
    The addClass() method is an inbuilt method in jQuery that is used to add more properties to each selected element. It can also be used to change the property of the selected element. This method can be used in two different ways: 1) By adding a Class name directly: Here, the Class name can be used d
    2 min read
    jQuery after() Method
    The after() method is an inbuilt function in jQuery which is used to insert content, specified by the parameter for each selected element in the set of matched elements. Syntax: $(selector).after(A);Parameter: It accepts a parameter "A" which is either a content or function passed to the method. Ret
    1 min read
    jQuery append() Method
    The append() method in jQuery is used to insert some content at the end of the selected elements. Syntax: $(selector).append( content, function(index, html) ) Parameters: This method accepts two parameters as mentioned above and described below: content: It is a required parameter and is used to spe
    2 min read

    jQuery Traversing

    jQuery | Traversing
    In jQuery, traversing means moving through or over the HTML elements to find, filter or select a particular or entire element. Based on the traversing purposes following methods are Categorized as follows: Tree Traversing: Ancestors: parent() it gives parent element of specified selector Syntax: $(s
    4 min read
    jQuery add() method
    The jQuery add() method is used to add elements to the existing group of elements. This method can add element to the whole document, or just inside the context element if the context parameter is defined. Syntax: $(selector).add(element, context_parameter) Here selector helps to find the matching e
    1 min read
    jQuery addBack() Method
    The addBack() is an inbuilt method in jQuery that adds the previous set of elements to the current set. This method adds previous DOM tree elements to the current set and maintains them in the internal stack which will take care of changes to the matched set of elements. Syntax: .addBack(selector) P
    2 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences