Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#14114 closed bug (notabug)

jQuery.data is missing on a removed element in a MutationObserver

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 2.0.3
Keywords: Cc:
Blocked by: Blocking:


This may be the intended effect, but I recently had a use-case where I stored data on a element, and later wanted to reference that data (via MutationObserver) when the element was removed from the DOM.

Example case: http://jsfiddle.net/JN5ed/

Change History (2)

comment:1 Changed 10 years ago by timmywil

Resolution: notabug
Status: newclosed

Right, this is intended behavior. Data is cleared when elements are removed.

comment:2 Changed 10 years ago by scottgonzalez

You may want to use .detach(). If you need more help, please use the forums or Stack Overflow.

Note: See TracTickets for help on using tickets.