I need to check whether an element is bound to an event or not. How to
achieve this?
usually when I bind a click event I do this.
unbind before bind
$(elm).unbind('click');
$(elm).bind(click, function() {
});
may be a modification like this
if(!$(elm).unbind('click')) {
$(elm).bind(click, function() {
alert(This element was only bound if it was not bound);
});
}
On
hi, thanks. But, what is happening here is:
There is an DOM element, which is reloading(replaced by ajax response
with same id/tag), then the event isn't no more bounded. I want it to be
bounded all the time. Do you think, here unbound will work? Or Is there any
way to keep the binding
3 matches
Mail list logo