Bug Tracker

Opened 14 years ago

Closed 14 years ago

#4813 closed bug (invalid)

remove() can't unbind the event which created by live()

Reported by: kai.ma Owned by: brandon
Priority: major Milestone: 1.4
Component: event Version: 1.3.2
Keywords: remove Cc:
Blocked by: Blocking:


when we binded a CLICK event by live("click",funciton(){}),

first,remove a DOM by remove(),

Second,create this DOM above and bind CLICK event by live() again. we will find that there are two CLICK events.

Change History (1)

comment:1 Changed 14 years ago by brandon

Resolution: invalid
Status: newclosed

This is the whole purpose of .live(). It does event delegation so that manipulating the DOM does not mean you have to worry about the events being unbound and having to rebind them. If you don't want the event to exist anymore, use .die() or just use regular .bind().

Note: See TracTickets for help on using tickets.