The hoverFlow plugin (http://www.2meter3.de/code/hoverFlow/) prevents
animation queue buildup, especially in hover animations. As such, it
acts as a proxy for jQuery's animate()-method and uses the same
definition of animation parameters, durations and options.

However, people want to use it as a replacement for slideDown/slideUp.
This is perfectly possible if you know that slideDown/slideUp is just
a shortcut for animate with a set of animation parameters.
Unfortunately, most people don't.

By having access to these properties, I could allow for the keyword
and map over to the according animation properties object.

Ralf

On May 22, 11:32 pm, John Resig <[email protected]> wrote:
> What would these properties be used for?
>
> --John
>
> On Fri, May 22, 2009 at 5:21 PM, Ralf Stoltze
> <[email protected]>wrote:
>
>
>
> > Hi,
>
> > in order to simplify usage of my hoverFlow plugin, I'd like to have
> > access to the animation properties object used by jQuery's shortcut
> > animations like slideDown/slideUp.
>
> > This can be done with only one additional statement:
>
> > // Generate shortcuts for custom animations
> > jQuery.each({
> >        slideDown: genFx("show", 1),
> >        slideUp: genFx("hide", 1),
> >        slideToggle: genFx("toggle", 1),
> >        fadeIn: { opacity: "show" },
> >        fadeOut: { opacity: "hide" }
> > }, function( name, props ){
> >        jQuery[ name ] = props; // Give access to animation properties
> >        jQuery.fn[ name ] = function( speed, callback ){
> >                return this.animate( props, speed, callback );
> >        };
> > });
>
> > What do you think? Do you see any other use case for this? Do you see
> > another way of doing this?
>
> > Instead of cluttering the jQuery namespace with 5 more properties, we
> > could also wrap it into a single object. animProps? defaultAnimations?
> > Anyone?
>
> > Ralf
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to