Skip to content

Commit 1dce11b

Browse files
committed
Added demo for animated dialog.
1 parent 8936687 commit 1dce11b

2 files changed

Lines changed: 54 additions & 0 deletions

File tree

demos/dialog/animated.html

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<title>jQuery UI Dialog - Animation</title>
5+
<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
6+
<script type="text/javascript" src="../../jquery-1.3.2.js"></script>
7+
<script type="text/javascript" src="../../ui/ui.core.js"></script>
8+
<script type="text/javascript" src="../../ui/ui.draggable.js"></script>
9+
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
10+
<script type="text/javascript" src="../../ui/ui.dialog.js"></script>
11+
<script type="text/javascript" src="../../ui/effects.core.js"></script>
12+
<script type="text/javascript" src="../../ui/effects.blind.js"></script>
13+
<script type="text/javascript" src="../../ui/effects.explode.js"></script>
14+
<script type="text/javascript" src="../../external/bgiframe/jquery.bgiframe.js"></script>
15+
<link type="text/css" href="../demos.css" rel="stylesheet" />
16+
<script type="text/javascript">
17+
$.ui.dialog.defaults.bgiframe = true;
18+
// increase the default animation speed to exaggerate the effect
19+
$.fx.speeds._default = 1000;
20+
$(function() {
21+
$('#dialog').dialog({
22+
autoOpen: false,
23+
show: 'blind',
24+
hide: 'explode'
25+
});
26+
27+
$('#opener').click(function() {
28+
$('#dialog').dialog('open');
29+
return false;
30+
});
31+
});
32+
</script>
33+
</head>
34+
<body>
35+
36+
<div class="demo">
37+
38+
<div id="dialog" title="Basic dialog">
39+
<p>This is an animated dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
40+
</div>
41+
42+
<button id="opener">Open Dialog</button>
43+
44+
</div><!-- End demo -->
45+
46+
<div class="demo-description">
47+
48+
<p>Dialogs may be animated by specifying an effect for the show and/or hide properties. You must include the individual effects file for any effects you would like to use.</p>
49+
50+
</div><!-- End demo-description -->
51+
52+
</body>
53+
</html>

demos/dialog/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<h4>Examples</h4>
1111
<ul>
1212
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
13+
<li><a href="animated.html">Animated dialog</a></li>
1314
<li><a href="modal.html">Modal dialog</a></li>
1415
<li><a href="modal-message.html">Modal message</a></li>
1516
<li><a href="modal-confirmation.html">Modal confirmation</a></li>

0 commit comments

Comments
 (0)