Added onAfterPageChange as a callback of animation complete.