/ Published in: jQuery

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function remove() { $('.elements').each(function() { if ($(this).data('events')) { $(this) .data('eventStore', eval($(this).data('events').toSource())) .unbind(); } }); } function restore() { $('.elements').each(function() { var events = $(this).data('eventStore'); if (events) { for (var type in events) { for (var num in events[type]) { $(this).bind(type, events[type][num].handler); } } } }); }
Comments
