2016-04-29 17 views
0

WordPressでsmoothstate.jsを使用していますが、次のページが完全に読み込まれるまで現在のページをアクティブに保つ方法を見つけようとしています。現在のページが終了しています。ここでは一例です。ここでhttp://springsummer.dk/SmoothState.js次のページが表示されるまで現在のページを表示

は私のコードは次のとおりです。

(function($) { 
'use strict'; 
var $page = $('#main'), 
    options = { 
     debug: true, 
     prefetch: true, 
     cacheLength: 10, 
     onStart: { 
      duration: 1000, // Duration of our animation 
      render: function ($container) { 
       // Add your CSS animation reversing class 
       $container.addClass('is-exiting'); 
       // Restart your animation 
       smoothState.restartCSSAnimations(); 
      } 
     }, 
     onReady: { 
      duration: 0, 
      render: function ($container, $newContent) { 
       // Remove your CSS animation reversing class 
       $container.removeClass('is-exiting'); 
       // Inject the new content 
       $container.html($newContent); 
      } 
     }, 
     onAfter: function ($container) { 
      $container.removeClass('is-exiting'); 
     } 
    }, 
    smoothState = $page.smoothState(options).data('smoothState'); 
})(jQuery); 

答えて

0

私が見つけた解決策は一時的なラッパーで、現在のページのクローンを作成することです。

関連する問題