Rewrote part of the leave function in the animation to include a done callback that will make the DELETE request