pjax logic for page changes on mobile