Trying to print the distance using jQuery