
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
List of All jQuery Events
Events are actions that can be detected by your Web Application. When these events are triggered you can then use a custom function to do pretty much whatever you want with the event. These custom functions call Event Handlers.
Example
Let us see an example of bind() jQuery event. Using the jQuery Event Model, we can establish event handlers on DOM elements with the bind() method as follows:
<html> <head> <title>jQuery bind()</title> <script src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script> $(document).ready(function() { $('div').bind('click', function( event ){ alert('Hi there!'); }); }); </script> <style> .div { margin:10px; padding:12px; border:2px solid #666; width:60px; } </style> </head> <body> <p>Click on any square below to see the result:</p> <div class = "div" style = "background-color:blue;">ONE</div> <div class = "div" style = "background-color:green;">TWO</div> <div class = "div" style = "background-color:red;">THREE</div> </body> </html>
Here's the list of some jQuery events:
S. NO |
Event Type & Description |
---|---|
1. |
Blur Occurs when the element loses focus. |
2. |
Change Occurs when the element changes. |
3. |
Click Occurs when a mouse click. |
4. |
Dblclick Occurs when a mouse double-click. |
5. |
Keydown Occurs when key is pressed. |
6. |
Scroll Occurs when window is scrolled. |
Advertisements