aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlouisremi <louisremi@louisremi-laptop.(none)>2011-04-15 15:18:21 +0200
committerlouisremi <louisremi@louisremi-laptop.(none)>2011-04-15 15:18:21 +0200
commit7666c3ef9a72fb77eaa018b692fd905be5559564 (patch)
tree54ebb445d3979af3643cdf8f1c340207c5a16f87 /src
parenteccf15be6cfee8b567785ba29cc8841b1b0c2ef1 (diff)
downloadjquery-7666c3ef9a72fb77eaa018b692fd905be5559564.tar.gz
jquery-7666c3ef9a72fb77eaa018b692fd905be5559564.zip
remove more useless code. feels good.
Diffstat (limited to 'src')
-rw-r--r--src/effects.js17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/effects.js b/src/effects.js
index 80391d89c..c30acb820 100644
--- a/src/effects.js
+++ b/src/effects.js
@@ -129,7 +129,7 @@ jQuery.fn.extend({
isElement = this.nodeType === 1,
hidden = isElement && jQuery(this).is(":hidden"),
name, val, p,
- easing, display, e,
+ display, e,
parts, start, end, unit;
// will store per property easing and be used to determine when an animation is complete
@@ -142,16 +142,15 @@ jQuery.fn.extend({
if ( p !== name ) {
prop[ name ] = prop[ p ];
delete prop[ p ];
- p = name;
}
- val = prop[p];
+ val = prop[name];
if ( val === "hide" && hidden || val === "show" && !hidden ) {
return opt.complete.call(this);
}
- if ( isElement && ( p === "height" || p === "width" ) ) {
+ if ( isElement && ( name === "height" || name === "width" ) ) {
// Make sure that nothing sneaks out
// Record all 3 overflow attributes because IE does not
// change the overflow attribute when overflowX and
@@ -183,13 +182,9 @@ jQuery.fn.extend({
}
// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
- if ( jQuery.isArray( val ) ) {
- easing = val[1];
- val = val[0];
- } else {
- easing = opt.specialEasing && opt.specialEasing[p] || opt.easing || 'swing';
- }
- opt.animatedProperties[p] = easing;
+ opt.animatedProperties[name] = jQuery.isArray( val ) ?
+ val[1]:
+ opt.specialEasing && opt.specialEasing[p] || opt.easing || 'swing';
}
if ( opt.overflow != null ) {