| 1 | <!doctype html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 6 | <title>jQuery UI Effects - switchClass Demo</title> |
| 7 | <link rel="stylesheet" href="../../themes/base/all.css"> |
| 8 | <link rel="stylesheet" href="../demos.css"> |
| 9 | <style> |
| 10 | .toggler { width: 500px; height: 200px; position: relative; } |
| 11 | #button { padding: .5em 1em; text-decoration: none; } |
| 12 | #effect { position: relative; } |
| 13 | .newClass { width: 240px; padding: 1em; letter-spacing: 0; margin: 0; } |
| 14 | .anotherNewClass { text-indent: 40px; letter-spacing: .2em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.1em; } |
| 15 | </style> |
| 16 | <script src="../../external/requirejs/require.js"></script> |
| 17 | <script src="../bootstrap.js"> |
| 18 | $( "#button" ).on( "click", function() { |
| 19 | $( ".newClass" ).switchClass( "newClass", "anotherNewClass", 1000 ); |
| 20 | $( ".anotherNewClass" ).switchClass( "anotherNewClass", "newClass", 1000 ); |
| 21 | }); |
| 22 | </script> |
| 23 | </head> |
| 24 | <body> |
| 25 | |
| 26 | <div class="toggler"> |
| 27 | <div id="effect" class="newClass ui-corner-all"> |
| 28 | Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. |
| 29 | </div> |
| 30 | </div> |
| 31 | <button id="button" class="ui-state-default ui-corner-all">Run Effect</button> |
| 32 | |
| 33 | <div class="demo-description"> |
| 34 | <p>Click the button above to preview the effect.</p> |
| 35 | </div> |
| 36 | </body> |
| 37 | </html> |