Add support for distance attribute in infinite scroll