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