Response title
This is preview!
$('body').html(changed_html);
var selector = '*'; var s = []; var e; $(selector).addBack().each(function() { e = $._data(this, 'events'); if (!e) return; // console.log(e); console.log(this.tagName); // console.log(this.id); $.each(e, function (i, ev) { console.log(i); $.each(ev, function (j, h) { console.log(h.handler); }); }); });
But what is the best way to restore them?
Thanks in advance.
But there is no info about selectors in _data("events")I noticed your code did not find the selectors to add the events back.
© 2013 jQuery Foundation
Sponsored by and others.