aboutsummaryrefslogtreecommitdiffstats
path: root/src/effects.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects.js')
-rw-r--r--src/effects.js22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/effects.js b/src/effects.js
index c9332f7d7..147aa065f 100644
--- a/src/effects.js
+++ b/src/effects.js
@@ -1,7 +1,6 @@
define( [
"./core",
"./var/document",
- "./var/isFunction",
"./var/rcssNum",
"./var/rnothtmlwhite",
"./css/var/cssExpand",
@@ -19,7 +18,7 @@ define( [
"./manipulation",
"./css",
"./effects/Tween"
-], function( jQuery, document, isFunction, rcssNum, rnothtmlwhite, cssExpand,
+], function( jQuery, document, rcssNum, rnothtmlwhite, cssExpand,
isHiddenWithinTree, swap, adjustCSS, cssCamelCase, dataPriv, showHide ) {
"use strict";
@@ -150,7 +149,7 @@ function defaultPrefilter( elem, props, opts ) {
// Restrict "overflow" and "display" styles during box animations
if ( isBox && elem.nodeType === 1 ) {
- // Support: IE <=9 - 11, Edge 12 - 15
+ // Support: IE <=9 - 11+, Edge 12 - 18+
// Record all 3 overflow attributes because IE does not infer the shorthand
// from identically-valued overflowX and overflowY and Edge just mirrors
// the overflowX value there.
@@ -310,10 +309,7 @@ function Animation( elem, properties, options ) {
var currentTime = fxNow || createFxNow(),
remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
- // Support: Android 2.3 only
- // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
- temp = remaining / animation.duration || 0,
- percent = 1 - temp,
+ percent = 1 - ( remaining / animation.duration || 0 ),
index = 0,
length = animation.tweens.length;
@@ -386,7 +382,7 @@ function Animation( elem, properties, options ) {
for ( ; index < length; index++ ) {
result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
if ( result ) {
- if ( isFunction( result.stop ) ) {
+ if ( typeof result.stop === "function" ) {
jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
result.stop.bind( result );
}
@@ -396,7 +392,7 @@ function Animation( elem, properties, options ) {
jQuery.map( props, createTween, animation );
- if ( isFunction( animation.opts.start ) ) {
+ if ( typeof animation.opts.start === "function" ) {
animation.opts.start.call( elem, animation );
}
@@ -429,7 +425,7 @@ jQuery.Animation = jQuery.extend( Animation, {
},
tweener: function( props, callback ) {
- if ( isFunction( props ) ) {
+ if ( typeof props === "function" ) {
callback = props;
props = [ "*" ];
} else {
@@ -461,9 +457,9 @@ jQuery.Animation = jQuery.extend( Animation, {
jQuery.speed = function( speed, easing, fn ) {
var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
complete: fn || !fn && easing ||
- isFunction( speed ) && speed,
+ typeof speed === "function" && speed,
duration: speed,
- easing: fn && easing || easing && !isFunction( easing ) && easing
+ easing: fn && easing || easing && typeof easing !== "function" && easing
};
// Go to the end state if fx are off
@@ -490,7 +486,7 @@ jQuery.speed = function( speed, easing, fn ) {
opt.old = opt.complete;
opt.complete = function() {
- if ( isFunction( opt.old ) ) {
+ if ( typeof opt.old === "function" ) {
opt.old.call( this );
}