Given a child element, climb up the DOM and find the first parent element matching your criteria