Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Itang Sanjana ItangSanjana

🎯
Focusing
View GitHub Profile
@cowboy
cowboy / ba-detach.js
Created Apr 23, 2011
JavaScript detach: detach a node from the DOM, optionally reattaching it when done.
View ba-detach.js
/*!
* JavaScript detach - v0.2 - 5/18/2011
* http://benalman.com/
*
* Copyright (c) 2011 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
function detach(node, async, fn) {