[jQuery] How to check whether an element is bound to an event or not?

2010-01-02 Thread ranacseruet
I need to check whether an element is bound to an event or not. How to achieve this?

Re: [jQuery] How to check whether an element is bound to an event or not?

2010-01-02 Thread waseem sabjee
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

Re: [jQuery] How to check whether an element is bound to an event or not?

2010-01-02 Thread Md. Ali Ahsan Rana
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