Just to clarify: I'm not planning on removing step: function(){}, I'm just changing the argument that it's receiving from being an absolute number (generally in pixels) to a decimal number (from 0 to 1). In 1.2 I want to make it so that you can animate non-numerical properties (like colors) which will require this change.
To future proof your code, I'd probably just recommend checking the version of jQuery - because, honestly, there's no way to tell the difference otherwise. Something like: if ( parseFloat(jQuery.fn.jquery) <= 1.1 ) { // it's a pixel amount } else { // it's a decimal amount } --John On 8/5/07, Dan G. Switzer, II <[EMAIL PROTECTED]> wrote: > > John, > > >Everyone: I really discourage against making plugins rely on step: > >right now - it's an undocumented function that was going to be removed > >from jQuery. However, since people are using it now, that means that > >its API will have to be adapted to work with the upcoming jQuery 1.2 > >animation changes. > > > >Namely, step will now be passed a decimal representing a number 0 to 1 > >(1 means that the animation is complete). So just a big word of > >warning, I wouldn't adapt too many accordion plugins to use it yet, > >since the change is imminent. > > What technique would you suggest fixing the bump in v1.2? > > Right now, you're using the step because it returns the current height of > the item being hidden. This allows you to offset how much of the newly > visible panel should be shown. > > Were you planning in v1.2 to have a property callback function that could be > used in a similar manor? > > This does seem like a useful feature--but maybe it should be called "onstep" > instead. > > I could see why you might want to adjust other elements based on the current > animation status. > > How would you recommend fixing this code for 1.2+? > > I can easily "future proof" this plug-in now--that way there's no need to > update when the next version of jQuery comes out. > > -Dan > >