var eased,
hooks = Tween.propHooks[ this.prop ];
- this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration );
+ if ( this.options.duration ) {
+ this.pos = eased = jQuery.easing[ this.easing ](
+ percent, this.options.duration * percent, 0, 1, this.options.duration
+ );
+ } else {
+ this.pos = eased = percent;
+ }
this.now = ( this.end - this.start ) * eased + this.start;
if ( this.options.step ) {
});
});
+test( "Animations with 0 duration don't ease (#12273)", 1, function() {
+ jQuery.easing.test = function() {
+ ok( false, "Called easing" );
+ };
+
+ jQuery( "#foo" ).animate({
+ height: 100
+ }, {
+ duration: 0,
+ easing: "test",
+ complete: function() {
+ equal( jQuery( this ).height(), 100, "Height is 100" );
+ }
+ });
+
+ delete jQuery.easing.test;
+});
+
} // if ( jQuery.fx )