corrade-http-templates – Blame information for rev 57
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
57 | office | 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 - Toggle Demo</title> |
||
7 | <link rel="stylesheet" href="../../themes/base/all.css"> |
||
8 | <link rel="stylesheet" href="../demos.css"> |
||
9 | <style> |
||
10 | .toggler { |
||
11 | width: 500px; |
||
12 | height: 200px; |
||
13 | } |
||
14 | #button { |
||
15 | padding: .5em 1em; |
||
16 | text-decoration: none; |
||
17 | } |
||
18 | #effect { |
||
19 | position: relative; |
||
20 | width: 240px; |
||
21 | height: 170px; |
||
22 | padding: 0.4em; |
||
23 | } |
||
24 | #effect h3 { |
||
25 | margin: 0; |
||
26 | padding: 0.4em; |
||
27 | text-align: center; |
||
28 | } |
||
29 | </style> |
||
30 | <script src="../../external/requirejs/require.js"></script> |
||
31 | <script src="../bootstrap.js" data-modules="effects-all"> |
||
32 | // run the currently selected effect |
||
33 | function runEffect() { |
||
34 | // get effect type from |
||
35 | var selectedEffect = $( "#effectTypes" ).val(); |
||
36 | |||
37 | // Most effect types need no options passed by default |
||
38 | var options = {}; |
||
39 | // some effects have required parameters |
||
40 | if ( selectedEffect === "scale" ) { |
||
41 | options = { percent: 50 }; |
||
42 | } else if ( selectedEffect === "size" ) { |
||
43 | options = { to: { width: 200, height: 60 } }; |
||
44 | } |
||
45 | |||
46 | // Run the effect |
||
47 | $( "#effect" ).toggle( selectedEffect, options, 500 ); |
||
48 | }; |
||
49 | |||
50 | // Set effect from select menu value |
||
51 | $( "#button" ).on( "click", function() { |
||
52 | runEffect(); |
||
53 | }); |
||
54 | </script> |
||
55 | </head> |
||
56 | <body> |
||
57 | |||
58 | <div class="toggler"> |
||
59 | <div id="effect" class="ui-widget-content ui-corner-all"> |
||
60 | <h3 class="ui-widget-header ui-corner-all">Toggle</h3> |
||
61 | <p> |
||
62 | Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi. |
||
63 | </p> |
||
64 | </div> |
||
65 | </div> |
||
66 | |||
67 | <select name="effects" id="effectTypes"> |
||
68 | <option value="blind">Blind</option> |
||
69 | <option value="bounce">Bounce</option> |
||
70 | <option value="clip">Clip</option> |
||
71 | <option value="drop">Drop</option> |
||
72 | <option value="explode">Explode</option> |
||
73 | <option value="fade">Fade</option> |
||
74 | <option value="fold">Fold</option> |
||
75 | <option value="highlight">Highlight</option> |
||
76 | <option value="puff">Puff</option> |
||
77 | <option value="pulsate">Pulsate</option> |
||
78 | <option value="scale">Scale</option> |
||
79 | <option value="shake">Shake</option> |
||
80 | <option value="size">Size</option> |
||
81 | <option value="slide">Slide</option> |
||
82 | </select> |
||
83 | |||
84 | <button id="button" class="ui-state-default ui-corner-all">Run Effect</button> |
||
85 | |||
86 | <div class="demo-description"> |
||
87 | <p>Click the button above to preview the effect.</p> |
||
88 | </div> |
||
89 | </body> |
||
90 | </html> |