Skip to content

Instantly share code, notes, and snippets.

View ItangSanjana's full-sized avatar
🎯
Focusing

Itang Sanjana ItangSanjana

🎯
Focusing
View GitHub Profile
@cowboy
cowboy / ba-detach.js
Created April 23, 2011 16:43
JavaScript detach: detach a node from the DOM, optionally reattaching it when done.
/*!
* 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) {