I have a class with the following type of css animaton
.cssanimation {
-webkit-transition: 0.2s all ease-in-out
-o-transition: 0.2s all ease-in-out
-moz-transition: 0.2s all ease-in-out
transition: 0.2s all ease-in-out
.. some other changes in position
}
I have the div
<div id="thediv"> ... </div>
$('#thediv').addClass('cssanimation') //animates the object
I do use this animation at some point but sometimes I’d like to add it without invoking the animation
Does Jquery have a way in which I can add classes without invoking their css animations?
Simply you create another class without animation and use it.
It’s not difficult to change CSS rules at runtime, but apparently it is difficult to find the rule you want. PPK has a quick tour of this on http://www.quirksmode.org.