forked from jsmarkus/jquery-ui-dialog-extra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
68 lines (58 loc) · 1.38 KB
/
demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"></script>
<script src="jquery.dialog.extra.js"></script>
<meta charset=utf-8 />
<script>
$(function(){
$('#ex1').click(function(){
var div = $('<div />').html('<h3>Hello!</h3> I can be minimized and maximized!')
div.dialog(
{
canMinimize:true,
canMaximize:true,
title:'Dialog'
})
})
$('#ex2').click(function(){
var div = $('<div />').html('<h3>Hello!</h3> I can be minimized and maximized <b>programmatically</b>!')
div.dialog(
{
canMinimize:true,
canMaximize:true,
title:'Dialog',
buttons:[
{
text:'Min',
click:function(){
div.dialog('restore') //need to restore if maximized before
div.dialog('minimize')
}
},
{
text:'Max',
click:function(){
div.dialog('maximize')
}
},
{
text:'Rest',
click:function(){
div.dialog('restore')
}
}
]
})
})
})
</script>
<title>jQuery UI dialog extra demo</title>
</head>
<body>
<button id="ex1">Example 1</button>
<button id="ex2">Example 2</button>
</body>
</html>