Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede.
Example Switchclass
# jQuery UI Example β Switch Class
When the animated style changes, add and remove specified classes for each element within the matched set of elements.
For more details about the `.switchClass()` method, please see the API documentation [.switchClass()](#).
## .switchClass() Demo
Click the button to preview the effect.
jQuery UI Effects - .switchClass() Demo .toggler { width: 500px; height: 200px; position: relative; } #button { padding: .5em 1em; text-decoration: none; } #effect { position: relative; } .newClass { width: 240px; padding: 1em; letter-spacing: 0; font-size: 1.2em; margin: 0; } .anotherNewClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; } $(function() { $( "#button" ).click(function(){ $( ".newClass" ).switchClass( "newClass", "anotherNewClass", 1000 ); $( ".anotherNewClass" ).switchClass( "anotherNewClass", "newClass", 1000 ); return false; }); }); Run Effect
(#)
YouTip