I wanted an easeOutBack easing for my animation. It was easy with a
few modifications:

modify sf.defaults
        sf.defaults = {
                etc.... current defaults,
                easing      : 'swing'
        };

modify showSuperfishUl (the 2nd to last line)

from
        $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul);
o.onShow.call($ul); });
        return this;

to
        $ul.animate(o.animation,o.speed,o.easing,function()
{ sf.IE7fix.call($ul); o.onShow.call($ul); });
        return this;

Swing is a native function in jquery, so I have that set to default.
If you include the easing plugin, then you have all of those
animations. easeOutBack looks really nice.

The example call would then be:

                $j('ul#main-menu')
                    .superfish({
                        animation:   {opacity:'show',height:'show'},
                        easing:      'easeOutBack'
                    })
            });

Reply via email to