Just create a variable like c.page then when you click the button to go to the next page with the new interface call c.page = 1; then for the place you said you wanted to click just add an if statement or a switch statement
if(c.page == 1) {
do shit on page 1
} else if (c.page == 2) {
do shit on page 2
}