docs: function afterAnimation() {
        // Set classes
        var pageClasses = 'page-previous page-current page-next';
        var navbarClasses = 'navbar-previous navbar-current navbar-next';
        $newPage.removeClass(pageClasses).addClass('page-current').removeAttr('aria-hidden').trigger('page:position', { position: 'current' });
        $oldPage.removeClass(pageClasses).addClass('page-next').attr('aria-hidden', 'true').trigger('page:position', { position: 'next' });
        if (dynamicNavbar) {
          $newNavbarInner.removeClass(navbarClasses).addClass('navbar-current').removeAttr('aria-hidden');
          $oldNavbarInner.removeClass(navbarClasses).addClass('navbar-next').attr('aria-hidden', 'true');
        }
  
        // After animation event
        router.pageCallback('afterIn', $newPage, $newNavbarInner, 'previous', 'current', options);
        router.pageCallback('afterOut', $oldPage, $oldNavbarInner, 'current', 'next', options);
  
        // Remove Old Page
        if (router.params.stackPages && router.initialPages.indexOf($oldPage[0]) >= 0) {
          $oldPage.addClass('stacked');
          $oldPage.trigger('page:stack');
          if (separateNavbar) {
            $oldNavbarInner.addClass('stacked');
          }
        } else {
          router.pageCallback('beforeRemove', $oldPage, $oldNavbarInner, 'next', undefined, options);
          router.removePage($oldPage);
          if (separateNavbar && $oldNavbarInner.length) {
            router.removeNavbar($oldNavbarInner);
          }
        }
  
        router.allowPageChange = true;
        router.emit('routeChanged', router.currentRoute, router.previousRoute, router);
  
        // Preload previous page
        var preloadPreviousPage = router.params.preloadPreviousPage || router.params[((app.theme) + "SwipeBack")];
        if (preloadPreviousPage && router.history[router.history.length - 2] && !isMaster) {
          router.back(router.history[router.history.length - 2], { preload: true });
        }
        if (router.params.pushState) {
          History.clearRouterQueue();
        }
      }