Advertisement
Guest User

Untitled

a guest
Jan 27th, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Element Fading</title>
  5. <link rel="stylesheet" href="../style.css"/>
  6. <script type="text/javascript" src="../jquery-1.11.1.js"></script>
  7. <script type="text/javascript">
  8.  
  9. $("#show").click(function() {
  10. $("#theDiv").show("fast");
  11. });
  12. $("#hide").click(function() {
  13. $("#theDiv").hide(1000, "swing");
  14. });
  15. </script>
  16. <style type="text/css">
  17. p, span {
  18. font-size: 16pt;
  19. }
  20. button {
  21. margin: 5pt 5pt 0 0;
  22. }
  23. </style>
  24. </head>
  25. <body>
  26. <h1>Element Fading Routines</h1>
  27. <p>Page elements can be faded in or out using a set of dedicated jQuery functions.</p>
  28. <ul>
  29. <li><code>fadeIn()</code> fades the element in from being invisible</li>
  30. <li><code>fadeOut()</code> fades the element out and removes it from layout</li>
  31. <li><code>fadeTo()</code> fades the element to a specified opacity</li>
  32. </ul>
  33. <div id="theDiv" class="box">
  34. </div>
  35. <button id="fadein">Fade In</button>
  36. <button id="fadeout">Fade Out</button>
  37. <button id="fadeto3">Fade To 30%</button>
  38. <button id="fadeup">Fade To 100%</button>
  39. <button id="pulse">Pulsate</button>
  40. </body>
  41. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement