benbarnett / jquery-animate-enhanced

Extend $.animate() to detect CSS transitions for Webkit, Mozilla, IE>=10 and Opera and convert animations automatically.
http://playground.benbarnett.net/jquery-animate-enhanced/
MIT License
1.39k stars 196 forks source link

fallback for special easing that use CUBIC_BEZIER. #138

Closed ruddog closed 10 years ago

ruddog commented 10 years ago

Browsers that does not support cubic_bezier throw error: Object doesn't support property or method 'easeOutBack' To solve this if easing is different from swipe or linear it will be set as linear by default on old browsers

benbarnett commented 10 years ago

Thanks for this. The only thing is that this will revert all easing methods for any non-plugin (i.e. jQuery default) animations. If the user has the jquery easing plugin loaded on their site, then the custom easings will work.

We should check for the existence of this before just reverting it back to linear, otherwise those users will never be able to do custom easing. (I've used it in exactly this way before).

ruddog commented 10 years ago

Do you think this check is enough : if($.easing && !$.easing.hasOwnProperty(arguments[2])) If so I would make new pull request

benbarnett commented 10 years ago

@ruddog yeah I think that should do it. We can test it.