Subversion Repositories Sites.obs-saisons.fr

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
40 aurelien 1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
	<meta charset="UTF-8" />
5
	<title>jQuery UI Effects - Toggle Demo</title>
6
	<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
7
	<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
8
	<script type="text/javascript" src="../../ui/jquery.effects.core.js"></script>
9
	<script type="text/javascript" src="../../ui/jquery.effects.blind.js"></script>
10
	<script type="text/javascript" src="../../ui/jquery.effects.bounce.js"></script>
11
	<script type="text/javascript" src="../../ui/jquery.effects.clip.js"></script>
12
	<script type="text/javascript" src="../../ui/jquery.effects.drop.js"></script>
13
	<script type="text/javascript" src="../../ui/jquery.effects.explode.js"></script>
14
	<script type="text/javascript" src="../../ui/jquery.effects.fold.js"></script>
15
	<script type="text/javascript" src="../../ui/jquery.effects.highlight.js"></script>
16
	<script type="text/javascript" src="../../ui/jquery.effects.pulsate.js"></script>
17
	<script type="text/javascript" src="../../ui/jquery.effects.scale.js"></script>
18
	<script type="text/javascript" src="../../ui/jquery.effects.shake.js"></script>
19
	<script type="text/javascript" src="../../ui/jquery.effects.slide.js"></script>
20
	<link type="text/css" href="../demos.css" rel="stylesheet" />
21
	<style type="text/css">
22
		.toggler { width: 500px; height: 200px; }
23
		#button { padding: .5em 1em; text-decoration: none; }
24
		#effect { width: 240px; height: 135px; padding: 0.4em; position: relative; }
25
		#effect h3 { margin: 0; padding: 0.4em; text-align: center; }
26
	</style>
27
	<script type="text/javascript">
28
	$(function() {
29
		//run the currently selected effect
30
		function runEffect(){
31
			//get effect type from
32
			var selectedEffect = $('#effectTypes').val();
33
 
34
			//most effect types need no options passed by default
35
			var options = {};
36
			//check if it's scale or size - they need options explicitly set
37
			if(selectedEffect == 'scale'){  options = {percent: 0}; }
38
			else if(selectedEffect == 'size'){ options = { to: {width: 200,height: 60} }; }
39
 
40
			//run the effect
41
			$("#effect").toggle(selectedEffect,options,500);
42
		};
43
 
44
		//set effect from select menu value
45
		$("#button").click(function() {
46
			runEffect();
47
			return false;
48
		});
49
 
50
	});
51
	</script>
52
</head>
53
<body>
54
 
55
<div class="demo">
56
 
57
<div class="toggler">
58
	<div id="effect" class="ui-widget-content ui-corner-all">
59
		<h3 class="ui-widget-header ui-corner-all">Toggle</h3>
60
		<p>
61
			Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi.
62
		</p>
63
	</div>
64
</div>
65
 
66
<select name="effects" id="effectTypes">
67
	<option value="blind">Blind</option>
68
	<option value="bounce">Bounce</option>
69
	<option value="clip">Clip</option>
70
	<option value="drop">Drop</option>
71
	<option value="explode">Explode</option>
72
	<option value="fold">Fold</option>
73
	<option value="highlight">Highlight</option>
74
	<option value="puff">Puff</option>
75
	<option value="pulsate">Pulsate</option>
76
	<option value="scale">Scale</option>
77
	<option value="shake">Shake</option>
78
	<option value="size">Size</option>
79
	<option value="slide">Slide</option>
80
</select>
81
 
82
<a href="#" id="button" class="ui-state-default ui-corner-all">Run Effect</a>
83
</div><!-- End demo -->
84
 
85
<div class="demo-description">
86
 
87
<p>Click the button above to preview the effect.</p>
88
 
89
</div><!-- End demo-description -->
90
 
91
</body>
92
</html>