This version is old school, check out the latest version.

.closestDescendant( selector [, options ] )

by Tobias Lindig

Get the first element(s) that matches the selector by traversing down through descendants in the DOM tree level by level. It use a breadth first search (BFS), that mean it will stop going deeper in a subtree if the first matching descendant was found in the current subtree.


Versions

Version Date
0.1.2 Feb 17 2014
0.1.1 Apr 8 2013
0.1.0 Apr 8 2013