Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Element Fading</title>
- <link rel="stylesheet" href="../style.css"/>
- <script type="text/javascript" src="../jquery-1.11.1.js"></script>
- <script type="text/javascript">
- $("#show").click(function() {
- $("#theDiv").show("fast");
- });
- $("#hide").click(function() {
- $("#theDiv").hide(1000, "swing");
- });
- </script>
- <style type="text/css">
- p, span {
- font-size: 16pt;
- }
- button {
- margin: 5pt 5pt 0 0;
- }
- </style>
- </head>
- <body>
- <h1>Element Fading Routines</h1>
- <p>Page elements can be faded in or out using a set of dedicated jQuery functions.</p>
- <ul>
- <li><code>fadeIn()</code> fades the element in from being invisible</li>
- <li><code>fadeOut()</code> fades the element out and removes it from layout</li>
- <li><code>fadeTo()</code> fades the element to a specified opacity</li>
- </ul>
- <div id="theDiv" class="box">
- </div>
- <button id="fadein">Fade In</button>
- <button id="fadeout">Fade Out</button>
- <button id="fadeto3">Fade To 30%</button>
- <button id="fadeup">Fade To 100%</button>
- <button id="pulse">Pulsate</button>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement