onPageChange()

This function is called after changing to another page in the preview window.