Add, delete and manipulate DOM nodes

Here are examples taken from some of my code just to memorize common use node functions. I hope they are self-explanatory.

// Clone DOM node
var movingUrl = urlLineSPAN.cloneNode(true);
// Get Parent node
var urlList = urlLineSPAN.parentNode;
// Delete DOM Node
// Add DOM node
// or
urlAreaObj.insertBefore(newNode, existingNode);


Popular posts from this blog

Data visualization for Roadmap Microsite (Angular and D3.js)

Conceptual design

Four tools for prototyping: Sketch, Figma, Principle, and FramerX