jQuery events & handler functions

From: Adam L.
Sent on: Saturday, September 25, 2010 7:23 PM
Given a reference to an event handler function, is there is a simple way to check if it's already been assigned to an element?

You can call $(element).data('eve­nts') and get an array of event handlers for a given event, but I'm wondering if there's a built-in way of doing this.

Considering a jQuery plugin with a syntax like:

$(element).isBound('­event', func) -> Boolean

Would that be useful to anyone else?

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy