rstacruz/jquery.transit — Issue #25: Alternate jQuery.animate( properties, options ) syntax not supported
Author: bman654
Created: 2012-02-24 20:27:56+00:00
State: open

The documentation says:

> Use $('...').transition instead of jQuery's $('...').animate. It has the same syntax as animate.

But it really only supports the `.animate( properties [, duration] [, easing] [, complete] )` overload. I usually use the `jQuery.animate( properties, options )` overload to make my code clearer:

```javascript
$(this).transition({
backgroundColor: "red"
}, {
duration: 900,
easing: "linear"
});
```

And if I use your alternate syntax (put the duration and easing within the style properties argument, then your proposed fallback for animations in older browsers does not really work:

```javascript
if (!$.support.transition)
$.fn.transition = $.fn.animate;
```