/samples/javascript.html

https://github.com/viavansi/flaminwork · HTML · 115 lines · 84 code · 21 blank · 10 comment · 0 complexity · 5a536d3153f63833477442f5adaede0f MD5 · raw file

  1. <!doctype html>
  2. <!--[if lt IE 7]><html lang="en" class="ie ie6 ltie9 ltie8 ltie7"><![endif]-->
  3. <!--[if IE 7]><html lang="en" class="ie ie7 ltie9 ltie8"><![endif]-->
  4. <!--[if IE 8]><html lang="en" class="ie ie8 ltie9"><![endif]-->
  5. <!--[if IE 9]><html lang="en" class="ie ie9"><![endif]-->
  6. <!--[if gt IE 9]><html lang="en" class="ie"><![endif]-->
  7. <!--[if !IE]><!-->
  8. <html lang="en">
  9. <!--<![endif]-->
  10. <head>
  11. <!--[if IE]><![endif]-->
  12. <meta charset="utf-8" />
  13. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  14. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  15. <title>CSS Helpers - Flaminwork</title>
  16. <!-- Styles -->
  17. <link href="../flaminwork.css" rel="stylesheet" />
  18. <style>
  19. #wrapper {
  20. width: 960px;
  21. margin: 1.5em auto;
  22. }
  23. .box {
  24. background: #eee;
  25. }
  26. li.even {
  27. background: #eee;
  28. }
  29. li.odd {
  30. background: #ccc;
  31. }
  32. li.first {
  33. background: purple;
  34. color: #fff;
  35. }
  36. li.last {
  37. background: green;
  38. color: #fff;
  39. }
  40. li.hover {
  41. background: red;
  42. color: #fff;
  43. }
  44. </style>
  45. <!-- Scripts -->
  46. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
  47. <script src="../flaminwork.js"></script>
  48. <script>
  49. jQuery(function() {
  50. styleHelper.firstLast('ul', 'li');
  51. styleHelper.evenOdd('ul', 'li');
  52. styleHelper.addHover('li');
  53. expand.init();
  54. });
  55. </script>
  56. </head>
  57. <body>
  58. <div id="wrapper">
  59. <h1>Javascript demo</h1>
  60. <h2>Style Helper</h2>
  61. <ul>
  62. <li>This should have <code>class="first"</code> added by JS</li>
  63. <li>Lorem</li>
  64. <li>Ipsum</li>
  65. <li>Dolor</li>
  66. <li>Sit</li>
  67. <li>Amet</li>
  68. <li>Consectetum</li>
  69. <li>This should have <code>class="last"</code> added by JS</li>
  70. </ul>
  71. <h2>Expand blocks</h2>
  72. <div class="expand-wrapper">
  73. <h3 class="expand-title">Click me!</h3>
  74. <div class="expand-body">
  75. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
  76. </div>
  77. </div>
  78. <hr class="separator" />
  79. <div class="expand-wrapper">
  80. <h3 class="expand-title">Click me!</h3>
  81. <div class="expand-body visible">
  82. <p><strong>I will be visible by default!</strong> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
  83. </div>
  84. </div>
  85. <hr class="separator" />
  86. <div class="expand-wrapper">
  87. <h3 class="expand-title">Click me!</h3>
  88. <div class="expand-body fade">
  89. <p><strong>I will have a fade effect!</strong> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
  90. </div>
  91. </div>
  92. </div><!-- #wrapper -->
  93. </body>
  94. </html>