Side navigation
#26 closed feature (fixed)
Opened July 01, 2006 11:31PM UTC
Closed August 23, 2006 05:29AM UTC
Last modified June 20, 2007 02:37AM UTC
Allow step callback for effects
Reported by: | steven@acko.net | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.0 |
Component: | effects | Version: | 1.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Context: I needed to call an extra callback during each step of an animation. This was so I could ensure that an expanding element was scrolled into view as much as possible. Doing it after the animation was already possible, but it looks cooler to also do it during each step of the animation.
I was able to add it easily with the following patch:
http://acko.net/dumpx/jquery.step.patch
There is already functionality in 1.0 alpha to pass extra parameters to .fx by passing a hash instead of a single callback function for 'callback'. After this patch, you can supply a step callback under the key 'step':
$(fieldset.contentWrapper).slideDown('medium', { // Make sure we open to height auto complete: function() { collapseScrollIntoView(fieldset); fieldset.animating = false; }, // Scroll the fieldset into view step: function() { collapseScrollIntoView(fieldset); } } );
Added in SVN.