I have an A tag which triggers the animation of it\'s great-great-great-grandparent. All of the following will work, but which is most efficient, and why?
$
I think I saw a presentation of John Resig saying that closest() is more optimized, and it makes some sense. Closest() is a newer addition to jQuery and comes to solve exactly this ugly parent().parent() chain. On the other hand parents() returns an array of parents that match your foo class and is more greedy in terms of searching compared with closest() that finds the first element and stops searching.
I would bet that closest() is the most efficient if you are looking for the closest match.