findup-element
Given a child element, climb up the DOM and find the first parent element matching your criteria.
Useful when dealing with event handlers.
Usage
el = findup(child, filter)
Returns the first element passing the filter(element)
function. Alternatively,
you can pass in an element name as a string or a single HTMLElement
.
var findup =var parent =var parent =var parent =
License
MIT. See LICENSE.md for details.