さて、私はついに半分の解決策を見つけました。ノードを完全に削除し、新しいノードを再挿入しました。アイデアを得ることができるように、ここに私のコードがあります:
// Before this, poll window.onscroll to wait for the skrollable-after
// class to be applied.
if (!this.flags.learnmore && Toolbox.hasClass(this.dom.learnmoreslider, 'skrollable-after')) {
// Sort of a misleading name, sorry, not an exact clone
var clone = document.createElement("span");
clone.innerHTML = this.dom.learnmoreslider.innerHTML;
// This was the end condition of the animation
// (it slid text horizontally) so it has to look the same.
clone.style.marginLeft = "250px";
var parent = this.dom.learnmoreslider.parentNode;
parent.appendChild(clone);
// This must be removed after in order to maintain the parent reference.
parent.removeChild(this.dom.learnmoreslider);
// Raise a flag or remove the listener or something, you're done
this.flags.learnmore = true;
}
}
少し不格好ですが、うまくいきます。私は間違いなく、アニメーションを殺す正しい方法にまだ興味があります.