Changing pages will call the onPageDisplayed callback.
Cast the page number explicitly as an int. Interacting with this function attribute has inconsistent results as JS sometimes casts it as a String.
Merge pull request #26 from Rodeoclash/master

Added an optional callback thats activated when the page is changed.