modify subpage switch events and add testcases
Merge pull request #22 from miller/master

modify subpage switch events