from cowboy/ba-detach.js
component install ramitos/detach
// Get an element.
var elem = document.getElementById('huge-ass-table');
// Just detach element from the DOM.
detach(elem);
// Detach + exec fn + reattach, synchronous.
detach(elem, function(err) {
// this == elem, do stuff here.
});
// Detach + exec fn + reattach, asynchronous.
detach(elem, true, function(err, reattach) {
// this == elem, do stuff here, call reattach() when done!
setTimeout(reattach, 1000);
});
Copyright (c) 2011 "Cowboy" Ben Alman
Dual licensed under the MIT and GPL licenses.