Finished example 7 with page transition callbacks