Skip to content

Documenting .animate() and all aliases. #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gnarf opened this issue Oct 4, 2012 · 0 comments
Closed

Documenting .animate() and all aliases. #81

gnarf opened this issue Oct 4, 2012 · 0 comments

Comments

@gnarf
Copy link
Member

gnarf commented Oct 4, 2012

This effects the following functions animate, fadeIn, fadeOut, fadeToggle, slideUp, slideDown, slideToggle, show, hide.

I would prefer if we started documenting the options signature of these functions above the duration, easing, callback signature. It might be nice to tie all the options possibilities into a single shared template anyway.

As of 1.8 version, the options and their possible values:

  • duration: A string or number determining how long the animation will run.
  • easing: A string indicating which easing function to use for the transition.
  • complete: A function to call once the animation has completed its last frame. (same as done)
  • done: A function to call once the animation has completed its last frame (1.8+)
  • fail: A function to call if the animation is stopped before completing its last frame (1.8+)
  • always: A function to call when then animation is finished, regardless of completion (1.8+)
  • progress: A function to call after each frame of the animation (1.8+)
  • step: A function to be called before setting each property on each frame of the animation.
  • queue: A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string.
  • specialEasing: A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions (added 1.4).

There is more documentation about the callback options on my draft documentation gist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants