aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlouisremi <louisremi@louisremi-laptop.(none)>2012-03-21 20:04:10 +0100
committerDave Methvin <dave.methvin@gmail.com>2012-03-21 12:28:10 -0700
commit07c8a9b2448f42ee940e7fc1351344eb372f7463 (patch)
tree401851eeba0014b448e7ed8fbfaef3fc388255eb
parentf40c862d1ea6f818dc1600165fa271f3c398eef3 (diff)
downloadjquery-07c8a9b2448f42ee940e7fc1351344eb372f7463.tar.gz
jquery-07c8a9b2448f42ee940e7fc1351344eb372f7463.zip
Fix #11469. Exclude margins from the negative property check.
-rw-r--r--src/effects.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/effects.js b/src/effects.js
index 790a63c8e..e154d2bd4 100644
--- a/src/effects.js
+++ b/src/effects.js
@@ -636,9 +636,12 @@ jQuery.extend( jQuery.fx, {
// Ensure props that can't be negative don't go there on undershoot easing
jQuery.each( fxAttrs.concat.apply( [], fxAttrs ), function( i, prop ) {
- jQuery.fx.step[ prop ] = function( fx ) {
- jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );
- };
+ // exclude marginTop, marginLeft, marginBottom and marginRight from this list
+ if ( prop.indexOf( "margin" ) ) {
+ jQuery.fx.step[ prop ] = function( fx ) {
+ jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );
+ };
+ }
});
if ( jQuery.expr && jQuery.expr.filters ) {