.switchClass( removeClassName, addClassName [, duration ] [, easing ] [, complete ] )Returns: jQuery
Description: Adds and removes the specified class(es) to each of the set of matched elements while animating all style changes.
removeClassNameOne or more class names (space separated) to be removed from the class attribute of each matched element.
addClassNameOne or more class names (space separated) to be added to the class attribute of each matched element.
400)A string or number determining how long the animation will run.
swing)A string indicating which easing function to use for the transition.
completeType: Function()A function to call once the animation is complete.
.switchClass() method allows you to animate the transition of adding and removing classes at the same time.
.switchClass(), support custom durations and easings, as well as providing a callback for when the animation completes.
Not all styles can be animated. For example, there is no way to animate a background image. Any styles that cannot be animated will be changed at the end of the animation.
Adds the class "blue" and removes the class "big" from the matched elements.