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

  • SEARCH
  • Home
  • 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 6031579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:12:16+00:00 2026-05-23T05:12:16+00:00

I am bind ing a click event in jquery by: $(‘#myButton’).bind(‘click’, onButtonClicked); It works

  • 0

I am binding a click event in jquery by:

$('#myButton').bind('click',  onButtonClicked);

It works great the first time, but then the view gets rerendered and although I am rebinding the event, it doesn’t seem to be working.

I am debugging via firebug and how do I know using JQuery that the click event has been assigned to this button? It doesn’t appear to get translated to a onClick event in the HTML.

EDIT:

I think the issue appears to be because I am doing something like this:

$("#myDiv").html("<input type='button' id='myButton'/>");
$('#myButton').bind('click',  onButtonClicked);

Is this valid? The $("#myButton").data("events") appears to have a click event assigned to it, but it does nothing when I click the button.

  • 1 1 Answer
  • 0 Views
  • 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-23T05:12:17+00:00Added an answer on May 23, 2026 at 5:12 am

    Here is a start jQuery find events handlers registered with an object

    $('#myButton').data('events');
    

    You can then iterate over the returned object to see what events are bound.

    $.each($("#myButton").data("events"), function(i, e) {
        alert(i);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am binding the click event to 4 href's (they have class=alink) using JQuery
I have a jquery event binding using .live that adds fancybox to the click
Why isn't jQuery binding to the click event? When I click the selects, they
I am binding a single click event to a large container using jQuery (event
I am binding a click event to an image using Jquery Live binding. The
I have the following code. The first attempt at binding to click event does
Using jQuery, I am binding some image tags with a click event like this:
The following XAML produces a run-time Binding error when I click on an item
The Binding syntax, {Binding /} , works in WPF but does not work at
In jquery an event hadler's binding is the event generating DOM element (this points

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.