Implement $.onExists.