switch pages with JS
only update total pages
remove unused