From dda67fc171d82523fa63bc63c011ebd4351911c9 Mon Sep 17 00:00:00 2001 From: Corey Frang Date: Thu, 29 Sep 2011 18:55:58 -0400 Subject: Effect core: Making animate class cross-frame safe, style guidence --- ui/jquery.effects.core.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui/jquery.effects.core.js') diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js index 15d81b4b0..699b41d81 100644 --- a/ui/jquery.effects.core.js +++ b/ui/jquery.effects.core.js @@ -161,7 +161,7 @@ var classAnimationActions = [ "add", "remove", "toggle" ], // prefix used for storing data on .data() dataSpace = "ec.storage."; -$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function(_, prop) { +$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) { $.fx.step[ prop ] = function( fx ) { if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { jQuery.style( fx.elem, prop, fx.end ); @@ -171,8 +171,8 @@ $.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopS }); function getElementStyles() { - var style = document.defaultView - ? document.defaultView.getComputedStyle(this, null) + var style = this.ownerDocument.defaultView + ? this.ownerDocument.defaultView.getComputedStyle( this, null ) : this.currentStyle, newStyle = {}, key, -- cgit v1.2.3 From e8ba367a58995b191706e5682eacba534cd25697 Mon Sep 17 00:00:00 2001 From: Corey Frang Date: Thu, 29 Sep 2011 20:45:23 -0400 Subject: Effects: fixing an animateClass issue when the class was empty --- ui/jquery.effects.core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/jquery.effects.core.js') diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js index 699b41d81..3dc0a4e67 100644 --- a/ui/jquery.effects.core.js +++ b/ui/jquery.effects.core.js @@ -223,7 +223,7 @@ $.effects.animateClass = function( value, duration, easing, callback ) { return this.queue( function() { var animated = $( this ), - baseClass = animated.attr( "class" ), + baseClass = animated.attr( "class" ) || "", finalClass, allAnimations = o.children ? animated.find( "*" ).andSelf() : animated; -- cgit v1.2.3