Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
/ detach Public archive

detach element from DOM

Notifications You must be signed in to change notification settings

sergioramos/detach

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

detach element from DOM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published