aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2015-05-05 10:24:20 -0700
committerTimmy Willison <timmywillisn@gmail.com>2015-05-05 10:24:20 -0700
commit5f2ea402582c7b8f4773771e1529d60587f3435e (patch)
tree1402dffc1deed7ec0074882ed9712f27fb2ef9f4 /src
parent436f0aee0a4c37ecb61b87a3a44227f6f5153b3a (diff)
downloadjquery-5f2ea402582c7b8f4773771e1529d60587f3435e.tar.gz
jquery-5f2ea402582c7b8f4773771e1529d60587f3435e.zip
Effects: set default easing using jQuery.easing._default
Fixes gh-2219 Close gh-2218
Diffstat (limited to 'src')
-rw-r--r--src/effects.js5
-rw-r--r--src/effects/Tween.js5
2 files changed, 7 insertions, 3 deletions
diff --git a/src/effects.js b/src/effects.js
index e19b04b06..4ead51ccd 100644
--- a/src/effects.js
+++ b/src/effects.js
@@ -289,7 +289,10 @@ function Animation( elem, properties, options ) {
animation = deferred.promise({
elem: elem,
props: jQuery.extend( {}, properties ),
- opts: jQuery.extend( true, { specialEasing: {} }, options ),
+ opts: jQuery.extend( true, {
+ specialEasing: {},
+ easing: jQuery.easing._default
+ }, options ),
originalProperties: properties,
originalOptions: options,
startTime: fxNow || createFxNow(),
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;