In this exercise, you will allow users to cycle through book-detail pages by swiping left or right.
We add class
bookdetail to each book-detail page, allowing us to limit the pages that will offer users swiping interaction.
$(document).on('swipeleft', '.bookdetail' handles swipe-left events on any div of class
bookdetail. We check to see if there is no next
if($(this).next('.bookdetail').length == 0). If yes (that is, if none exists), then we use the Pagecontainer's
change method to go to the
bookdetail; otherwise, we
change to the