- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to check if onClick exists on element in jQuery?
These codes might help you −
$('body').click(function(){ alert('test' )}) var foo = $.data( $('body').get(0), 'events' ).click // you can query $.data( object, 'events' ) and get an object back, then see what events are attached to it. $.each( foo, function(i,o) { alert(i) // guid of the event alert(o) // the function definition of the event handler });
- Related Articles
- How to check if event exists on element in jQuery?
- How to check if element exists in the visible DOM?
- How to check if Element exists in c# Selenium drivers?
- Check if a particular element exists in Java LinkedHashSet
- Java Program to check if a particular element exists in HashSet
- Check if element exists in list of lists in Python
- How to check if an element has a class in jQuery?
- How to find if element exists in document - MongoDB?
- How to check if a variable exists in JavaScript?
- How to check if a column exists in Pandas?
- How to check if a file exists in Golang?
- How to check if a MySQL database exists?
- How do I check if an element is hidden in jQuery?
- How can we check if file exists anywhere on the system in Java?
- How to check if an alert exists using WebDriver?

Advertisements