Simplify finding closest 'a' tag