detach element from DOM
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
.jshintrc
.tern-project
component.json
readme.md

readme.md

deprecated

detach

from cowboy/ba-detach.js

install

component install ramitos/detach

example

// 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);
});

license

Copyright (c) 2011 "Cowboy" Ben Alman

Dual licensed under the MIT and GPL licenses.

http://benalman.com/about/license