code: function swapElementNodes(currentNode, newNode, ignoreElements) {
      var currentAttr, shouldIgnore, $currChildNodes, $newChildNodes, currentAttributes,
        $currentNode = $(currentNode),
        $newNode = $(newNode),
        idx = 0;
  
      shouldIgnore = _.some(ignoreElements, function(selector) {
        return $currentNode.is(selector);
      });
  
      if (shouldIgnore) {
        return;
      }
  
      // Handle tagname changes with full replacement
      if (newNode.tagName !== currentNode.tagName) {
        $currentNode.replaceWith(newNode);
        return;
      }
  
      // Remove current attributes that have changed
      // This is necessary, because some types of attributes cannot be removed
      // without causing a browser error.
      currentAttributes = currentNode.attributes;
      while (idx < currentAttributes.length) {
        currentAttr = currentAttributes[idx].name;
        if (newNode.getAttribute(currentAttr)) {
          idx++;
        } else {
          currentNode.removeAttribute(currentAttr);
        }
      }
  
      // Set new attributes
      _.each(newNode.attributes, function(attrib) {
        currentNode.setAttribute(attrib.name, attrib.value);
      });
  
      cleanupStickitData(currentNode);
  
      // Quick check to see if we need to bother comparing sub-levels
      if ($currentNode.html() === $newNode.html()) {
        return;
      }
  
      // Include all child nodes, including text and comment nodes
      $newChildNodes = $newNode.contents();
      $currChildNodes = $currentNode.contents();
  
      // If the DOM lists are different sizes, perform a hard refresh
      if ($newChildNodes.length !== $currChildNodes.length) {
        $currentNode.html($newNode.html());
        return;
      }
  
      // Perform a recursive hotswap for all children nodes
      $currChildNodes.each(function(index, currChildNode) {
        hotswap(currChildNode, $newChildNodes.get(index), ignoreElements);
      });
    }
docs: /*
  Swap method for Element Nodes
  @param currentNode {Element} The pre-existing DOM Element to update
  @param newNode {Element} The detached DOM Element representing the desired DOM Element subtree
  @param ignoreElements {Array} Array of jQuery selectors for DOM Elements to ignore during render. Can be an expensive check.