I am using a series of CSS3 transitions but for older machinges back up by using JQuery UI add and remove class.
JQuery UI addClass animations are fully functional. JQuery UI removeClass however are not animating they are instead delaying for the animation time and then jumping to the attributes of the previous class.
$('.box').addClass('adds', 800); ANIMATING CORRECTLY
$('.box').removeClass('adds', 800); NOT ANIMATING AT ALL
.box {
background:#CCC;
border:1px solid #222;
height:200px;
width:200px;
}
.adds {
height:220px !important;
width:400px !important;
}
I have set up a Fiddle but for some reason this fiddle does nothing at all, no idea why. http://jsfiddle.net/aA9LN/4/
Any ideas?
Marvellous
.attr
). So essentially, I had to change the inline style with.css
, but that's not going to give me the smooth transition effect. However, jquery's other.animate
function will. Only thing I don't like about that, is that my style values are hardcoded and not in the CSS file. But it works. – Diggins