Skip to main content

Bug Tracker

Side navigation

#4886 closed enhancement (patchwelcome)

Opened July 11, 2009 07:23PM UTC

Closed April 17, 2011 12:27AM UTC

Last modified August 23, 2011 03:01PM UTC

Allow selective .die()

Reported by: ligreman Owned by: brandon
Priority: low Milestone:
Component: event Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

If you bind multiple events to a child element (e.g. "p span") then use the die even to remove one of them it removes all events bound to that, instead of only one.

Example attached.

Attachments (1)
  • prueba.html (1.0 KB) - added by ligreman July 11, 2009 07:24PM UTC.

    Example showing the bug

Change History (5)

Changed November 18, 2010 02:59AM UTC by dmethvin comment:1

milestone: 1.4
status: newopen

Changed November 19, 2010 02:47PM UTC by dmethvin comment:2

keywords: die, eventneedsdocs
priority: majorlow
summary: Bug in event DIE.Allow selective .die()
type: bugenhancement

I'm recasting this as an enhancement, we need to document that (at least up to 1.4.4), the selector in .die() must exactly match the one in .live().

See the discussion here, with a proposed patch:

http://forum.jquery.com/topic/building-out-live-and-die

Bugs #5662 and #7520 may be related.

Changed April 17, 2011 12:27AM UTC by john comment:3

resolution: → patchwelcome
status: openclosed

I'm fairly certain we have this documented now, but leaving the needsdocs just in case.

But yeah, I'm OK with the current functionality. If someone comes up with a smaller patch (than the one that was shown in the forum thread) and with a test case, please feel free to re-open!

Changed May 20, 2011 04:40PM UTC by dmethvin comment:4

keywords: needsdocs

Changed August 23, 2011 03:01PM UTC by anonymous comment:5

Test case example: http://jsfiddle.net/pPuG5/