1

そのJavaScriptコードの何が問題なのか誰にもわかりませんか? 実行されますが、スライドインのアニメーションは表示されません

mootools 1.2.4 を使用しています

  • mootools-1.2.4-core.js
  • mootools-1.2.4.4-more.js

私の最初の試み:

   window.addEvent('domready', function () {
        var mySlide = new Fx.Slide('errorBox');
        var ie = /MSIE (\d+\.\d+);/.test(navigator.userAgent);

        if ((ie && document.getElementById("errorBox").innerText == "") || !ie && document.getElementById("errorBox").textContent.trim() == "") {
            mySlide.hide();
        }
        else if (!ie && document.getElementById("errorBox").textContent.trim() == "") {
            mySlide.hide();
        } else {
            mySlide.slideIn();
        }
    });

遅延を追加しても役に立ちません。ページがロードされた後、遅延やアニメーションなしでボックスが表示されます

    window.addEvent('domready', function () {
        var mySlide = new Fx.Slide('errorBox');
        var ie = /MSIE (\d+\.\d+);/.test(navigator.userAgent);

        if ((ie && document.getElementById("errorBox").innerText == "") || !ie && document.getElementById("errorBox").textContent.trim() == "") {
            mySlide.hide();
        }
        else if (!ie && document.getElementById("errorBox").textContent.trim() == "") {
            mySlide.hide();
        } else {
            mySlide.slideIn().chain(function () {
            // Waits one second, then the Element appears without transition.
                this.slideIn.delay(5000, this);
            });
        }
    });

ありがとう

4

0 に答える 0