Search and Top Navigation
#4807 closed bug (fixed)
Opened August 27, 2009 01:32PM UTC
Closed November 06, 2009 01:47AM UTC
Last modified May 16, 2010 03:23PM UTC
$('').switchClass throwing error in IE8 if the switched class contains color property
Reported by: | arunpjohny | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.8 |
Component: | ui.effects.core | Version: | 1.7.2 |
Keywords: | switchClass | Cc: | arun.official.mail@gmail.com |
Blocked by: | Blocking: |
Description
hi,
I've the following css classes
.switch-format{ background-color: yellow; } .switch-format1{ background-color: blue; } .switch-format2{ color: red; }
Using this classes I want to do some animation on the following div
<div id="switch-class" class='switch-format' style="margin-top: 5px;">Effects - Switch</div>
Following is my jQuery code which will use switchClass to switch the classes at 5 sec interval
setTimeout(function() { alert('Switch 1'); jq('#switch-class').switchClass('switch-format', 'switch-format1', 3000); }, 5000); setTimeout(function() { alert('Switch 2'); jq('#switch-class').switchClass('switch-format1', 'switch-format2', 3000) }, 10000); setTimeout(function() { alert('Switch 3'); jq('#switch-class').switchClass('switch-format2', 'switch-format', 3000) }, 15000);
The first switch happens fine but when the second switch happens it fails in IE8, it works fine in FF3.
The error is 'Invalid Property Value'.
In IE it fails in the following line
fx.elem.style[ fx.prop ] = fx.now + fx.unit;
with the following values
fx.prop = 'borderColor'
fx.now = NaN
fx.unit = 'px'
fx.elem.style[ fx.prop ] = ''
fx.elem is the div with id 'switch-class'
Can you help me to solve this problem