jQueryアニメーションは私にとって途切れ途切れです(特にFirefoxで)。そこで、アニメーションにMoofXを使用することにしまし た。moofxサイトでは、コードの実装方法について明確な説明がありません。
このコードにMoofxエフェクトを実装する方法(基本的にjqueryアニメーションをmoofxに置き換えます)
jQuery(this).slideDown();
トグル機能は必要ありません。また、コードが現在のコードと少し似ているといいでしょう。
これがあなたが探しているものであるかどうかは完全にはわかりませんが、無名関数でjQuery関数をオーバーライドすることができます。fadeIn
関数をオーバーライドするサンプルを次に示します。
(function(){
// storing the reference to the original function
var original = jQuery.fn.fadeIn;
// this is the actual override/replacement
// it has to happen before you start up jQuery
jQuery.fn.fadeIn= function(){
// do whatever you wanna do here instead of using the original function
// I'm not super familiar with mooFX, but I take it's similar to MooTools
// This line can be entirely removed, leaving only YOUR code, in this case
// the MooFX effect replacing the fadeIn. If you leave it, it will run both
// your code and the original code
original.apply( this, arguments );
}
})();
// start up jQuery
$(function() {
// and code here like normal, meaning,
// every time you call $('#something').fadeIn({..}), it will run your code
});
注:繰り返しになりますが、これがあなたが探しているものであるかどうかはわかりません。また、MooFXがjQueryと一緒にどのように機能するかはわかりません。上記のコードは、jQuery関数をオーバーライドする方法を示すためのものです。