Move jQuery data() when an element is destroyed and re-created
Posted
by Ed Woodcock
on Stack Overflow
See other posts from Stack Overflow
or by Ed Woodcock
Published on 2010-03-30T11:20:04Z
Indexed on
2010/03/30
11:23 UTC
Read the original article
Hit count: 311
Can anyone think of a (preferably quick) way to move the data() attached to a DOM element to a new instance of itself?
The lightbox plugin I'm using deletes and re-appends and element to the page in order to display it in the lightbox (to aviod the multiple-ids issue that ASP.net has), and obviously the .data() that is attached to the element is lost when this happens.
© Stack Overflow or respective owner