function getParents(elements) {

  // find elements that are not children of any other elements
  return filter(elements, function(element) {
    return !find(elements, function(e) {
      return e !== element && getParent(element, e);
    });
  });
}
Get parent elements.

@param {Element[]} elements

@return {Element[]}