Returns a collection containing the parents from closest to oldest (excluding document
) for every element in the collection.
var parents;
// Append an ellipse and to that ellipse
// append a rect element
Pablo(demoElement).ellipse().circle().rect();
// Find the rect element (lowest level) and
// get its parents
parents = Pablo(demoElement).find('rect').parents();
parents.each(function (item) {
alert(item.tagName)
});