IE error when animating class (addClass/removeClass with speed)

78 views
Skip to first unread message

Karl Swedberg

unread,
Apr 14, 2009, 5:06:26 PM4/14/09
to jquery...@googlegroups.com
Hi folks,

I just ran across a strange error when using addClass('foo', 1200) in IE: when the class includes a declaration for the color property (e.g. color: #009900;), it throws an error.

Line: 4167
Character: 5
Code: 0
Error Message: Invalid property value.

Here is a test case:


It's hard to tell where that error is, given IE's spotty debug dialogs, but it might have something to do with step in jQuery 1.3.x:

step: {

opacity: function(fx){
jQuery.attr(fx.elem.style, "opacity", fx.now);
},

_default: function(fx){
if ( fx.elem.style && fx.elem.style[ fx.prop ] != null )
fx.elem.style[ fx.prop ] = fx.now + fx.unit;
else
fx.elem[ fx.prop ] = fx.now;
}
}


Actually, I just tested it in Safari 4beta Mac, and it didn't work at all. No error, no add class.

Any ideas?

--Karl

____________
Karl Swedberg




Eric Pascarello

unread,
Apr 14, 2009, 5:30:31 PM4/14/09
to jquery...@googlegroups.com
There is a couple of bugs in the tracker that are related to color changing in IE. I am not sure if this is related. It would probably be a good idea to log this in the tracker [http://dev.jqueryui.com/] if you have not do so already.

Eric

Scott González

unread,
Apr 14, 2009, 8:05:46 PM4/14/09
to jquery...@googlegroups.com
Hey Karl,

Class animation is pretty wacky right now.  Alex Farkas has done a lot of work on it in one of the dev branches, which we're hoping to land in 1.8.  I just ran your test case with the new code and it works.

http://jquery-ui.googlecode.com/svn/branches/dev/effects/ui/effects.core.js


On Tue, Apr 14, 2009 at 5:06 PM, Karl Swedberg <ka...@englishrules.com> wrote:

Karl Swedberg

unread,
Apr 14, 2009, 9:15:21 PM4/14/09
to jquery...@googlegroups.com
that's great news, Scott. Maybe not worth filing a bug in trac then.

thanks a lot for the update.

--Karl




Scott González

unread,
Apr 14, 2009, 9:17:26 PM4/14/09
to jquery...@googlegroups.com
Yeah, I'm not sure how many bugs are fixed in this branch, but it's a lot :-)
Reply all
Reply to author
Forward
0 new messages