Pablo

parentsSvg([filter])

Returns a collection containing the SVG parent elements, from closest to oldest, for every element in the collection.

var container = Pablo(document.createElement('div')),
    svg = Pablo.svg();

container.append(svg);

svg.circle().ellipse().rect();

container.find('rect').parentsSvg().each(function (elem) {
  alert(elem.tagName);
});
Painting is just another way of keeping a diary.
Pablo Picasso