I've been working on this for a while, trying to work out the best way of implementing this as a plugin whilst trying to keep as DRY as possible, just spotted this post, hope I'm not too late :)
I finally figured out the easiest way of defining an ease method would be to bastardise the speed function rather than rewriting the animate function. Also, using a bit of String, rewrite and eval prevented having to redo the whole fx function. I used a switch for the easing selection function. As a result this works great as a plugin. The standard effects start using the penner equations without having to change a line of code. And specifying custom ones uses all the standard effects. Check it out - http://gsgd.co.uk/sandbox/jquery.easing.php http://gsgd.co.uk/sandbox/jquery.easing.php I'd love to hear if anyone can tell me how to not use a switch for the easing function, not sure it's the best way, I'd like to be able to have a basic set of equations and then offer an extended set in a seperate file, but couldn't work out how to go about this. Any pointers anyone? Cheers, George. Jon Burger wrote: > > it would be good to be able > to pass in a function to the animate method too - much like you can pass a > function into the default array .sort() method - this function would > enable > different styles of easing anmation. > -- View this message in context: http://www.nabble.com/animate%28%29-support-for-custom-tween-easing-%27formulas%27-tf2169895.html#a6133934 Sent from the JQuery forum at Nabble.com. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/