jQuery nearest plugin Find the nearest DOM-elements from a starting element. Usage var nearestElements = $(".bar").nearest(".foo");