1

ナビゲーション メニュー項目をクリックすると、ページが読み込まれ、アニメーションが表示されます。戻る矢印と進む矢印を使用しようとすると、ページが読み込まれ、その特定のページに移動しますが、コンテンツがアニメーション表示されません。

何かご意見は?

コードはこちら

  var History = window.History; // Note: We are using a capital H instead of a lower h
        if (!History.enabled) {
            // History.js is disabled for this browser.
            // This is because we can optionally choose to support HTML4 browsers or not.
            return false;
        }

        // Bind to StateChange Event
        History.Adapter.bind(window, 'statechange', function() { // Note: We are using statechange instead of popstate
            var State = History.getState();
            $('#content').animate({opacity: "0"}).load(State.url + '#content', function() {
                 $('#content').animate({opacity: "1"});
            });
        });

        $('.nav-tabs li a').click(function (evt) {
            History.pushState(null, $(this).text(), $(this).attr('href'));

        });

どんなアイデアも素晴らしいでしょう!

4

0 に答える 0