From 5f2ea402582c7b8f4773771e1529d60587f3435e Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Tue, 5 May 2015 10:24:20 -0700 Subject: Effects: set default easing using jQuery.easing._default Fixes gh-2219 Close gh-2218 --- src/effects/Tween.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/effects') diff --git a/src/effects/Tween.js b/src/effects/Tween.js index 57f80908e..478fed007 100644 --- a/src/effects/Tween.js +++ b/src/effects/Tween.js @@ -13,7 +13,7 @@ Tween.prototype = { init: function( elem, options, prop, end, easing, unit ) { this.elem = elem; this.prop = prop; - this.easing = easing || "swing"; + this.easing = easing || jQuery.easing._default; this.options = options; this.start = this.now = this.cur(); this.end = end; @@ -105,7 +105,8 @@ jQuery.easing = { }, swing: function( p ) { return 0.5 - Math.cos( p * Math.PI ) / 2; - } + }, + _default: "swing" }; jQuery.fx = Tween.prototype.init; -- cgit v1.2.3