Implement slide to change pages.