ClassTransitions
The jQuery UI effects core extends the base class API to be able to animate between two different classes. The following jQuery methods are modified by jQuery UI to accept three additional parameters: speed
, easing
(optional), and callback
.
Class:
addClass( class ) | Returns: jQuery |
Adds the specified class(es) to each of the set of matched elements. |
switchClass
The switchClass
method allows you to visually transition from one class to another. (This functionality is often described as 'animateClass'.)
For example:
$(elem).switchClass('currentClass','newClass',500,'easeOutBounce',function(){ console.log('transition is done!'); });