Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 810187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:50:41+00:00 2026-05-15T00:50:41+00:00

Using: $(‘#foo’).data(‘events’).click We are able to access an iterative object of click handlers added

  • 0

Using:

$('#foo').data('events').click

We are able to access an iterative object of click handlers added to the element ‘#foo’ but only when they were added with .bind()

Is there a way to get the handlers for an event added with .live()?

Is there any other way to know if an element has a click handler assigned?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T00:50:42+00:00Added an answer on May 15, 2026 at 12:50 am

    live events are added to the document. Use

    $(document).data('events').click
    

    The above will return an array of objects containing information about each bound click handler. Each of these objects has a selector property containing the selector that was used at the time of binding with $(selector).live(.., ..).

    Any of these selectors that matches the element with id foo will get triggered when #foo is clicked. Note that the selector does not have to be exactly #foo for that to happen. There are many other selectors that can be used to target an element. For example if #foo was a <p>, then a live click handler such as

    $("p").live("click", function..)
    

    will also target #foo.

    Here’s one approach. Loop through each object, and see if any of the elements matching the selector property include #foo.

    var handlers = $(document).data('events').click;
    
    // jQuery quirk: $.map callback takes arguments (obj, index) and
    // $(..).map takes callback arguments as (index, obj)
    var fooClickHandlers = $.map(handlers, function(handler) {
        if($(handler.selector).is('#foo')) {
            return handler;
        }
        return null;
    });
    
    // fooClickHandlers is a list of all handlers that will fire on #foo click
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a web service to transfer json to an iPhone app. I'm using
Using just python, is it possible to possible to use a USB flash drive
using select statement we can call functions inside the stored procedure, is there another
Using VB6 & Crystal Report 9. Need help with the VB6 code. When i
Using the pthread library in C, is it possible to send a SIGSTOP signal
Using XSLT 1.0, I'm trying to essentially create a small node set and then
Using the NuPack addin and installing the NInject MVC 3 package results in the
Using Java (1.6) is it better to call the clear() method on a List
Using Facebox with .NET (Web Forms) is painful--this primarily HTML site was designed by
Using Visual Studio, I have built an C++ application running in 32bit. It will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.