Yes, the live function. http://docs.jquery.com/Events/live

"Added in jQuery 1.3: Binds a handler to an event (like click) for all
current - and future - matched element. Can also bind custom events."

On Jan 2, 11:44 pm, "Md. Ali Ahsan Rana" <ranacser...@gmail.com>
wrote:
> 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 whenever a new element is being loaded?
>
> Regards
>
> On Sun, Jan 3, 2010 at 1:41 AM, waseem sabjee <waseemsab...@gmail.com>wrote:
>
>
>
> > 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 Sat, Jan 2, 2010 at 7:28 PM, ranacseruet <ranacser...@gmail.com> wrote:
>
> >> I need to check whether an element is bound to an event or not. How to
> >> achieve this?
>
> --http://ranacseruet.blogspot.com/

Reply via email to