Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#26 closed feature (fixed)

Allow step callback for effects

Reported by: steven@… 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);
    }
  }
);

Change History (2)

comment:1 Changed 13 years ago by john

Priority: majorminor
Type: enhancementfeature

comment:2 Changed 13 years ago by john

Milestone: 1.0
Resolution: fixed
Status: newclosed
Version: 1.0

Added in SVN.

Note: See TracTickets for help on using tickets.