Can anyone think of a (preferably quick) way to move data () attached to a DOM element to the newest instance?
The Lightbox plugin that I use removes and reattaches the element to the page to display it in a lightbox (for aviod problems with multiple identifiers that ASP.net has) and, obviously, .data () that is attached to the element is lost when this happens.
A relatively new overload for .clone(), which you can use to do this.
.clone()
.clone(true) will copy an element with events and data without changes.
.clone(true)
, .detach(), .remove(), . :
.detach()
.remove()
.detach() .remove(), , .detach() jQuery, . , DOM .
Source: https://habr.com/ru/post/1739133/More articles:Is there an API (SOAP, JSON, XML-RPC, REST, anything) in Google code issues? - google-codeHow to add a complex structure to several places in an XML file - xsltiPhone: positioning multiple UITextFields when displaying a keyboard and changing orientation - iphoneMicrosoft.Web.Administration on Windows XP - visual-studioSubcircuits in SQL Server 2005/2008 - sqlDesign RESTful Question / Answer? - designКак настроить положение прокрутки в области прокрутки - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1739136/appendto-inside-each-in-jquery-seems-to-cause-flicker&usg=ALkJrhgA6kooBZtc0lI8foR2ccgPRoYA8gRefining Events GridView - eventsWhere can I get the MSDN Help Viewer for 2010, like the previous MSDN with the index, tree, and one window? - visual-studio-2010All Articles