1 |
<!doctype html> |
2 |
<html lang="en"> |
3 |
<head> |
4 |
<meta charset="utf-8"> |
5 |
<title>jQuery UI Dialog - Modal confirmation</title> |
6 |
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css"> |
7 |
<script src="../../jquery-1.9.1.js"></script> |
8 |
<script src="../../ui/jquery.ui.core.js"></script> |
9 |
<script src="../../ui/jquery.ui.widget.js"></script> |
10 |
<script src="../../ui/jquery.ui.mouse.js"></script> |
11 |
<script src="../../ui/jquery.ui.button.js"></script> |
12 |
<script src="../../ui/jquery.ui.draggable.js"></script> |
13 |
<script src="../../ui/jquery.ui.position.js"></script> |
14 |
<script src="../../ui/jquery.ui.button.js"></script> |
15 |
<script src="../../ui/jquery.ui.dialog.js"></script> |
16 |
<link rel="stylesheet" href="../demos.css"> |
17 |
<script> |
18 |
$(function() { |
19 |
$( "#dialog-confirm" ).dialog({ |
20 |
resizable: false, |
21 |
height:140, |
22 |
modal: true, |
23 |
buttons: { |
24 |
"Delete all items": function() { |
25 |
$( this ).dialog( "close" ); |
26 |
}, |
27 |
Cancel: function() { |
28 |
$( this ).dialog( "close" ); |
29 |
} |
30 |
} |
31 |
}); |
32 |
}); |
33 |
</script> |
34 |
</head> |
35 |
<body> |
36 |
|
37 |
<div id="dialog-confirm" title="Empty the recycle bin?"> |
38 |
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>These items will be permanently deleted and cannot be recovered. Are you sure?</p> |
39 |
</div> |
40 |
|
41 |
<p>Sed vel diam id libero <a href="http://example.com">rutrum convallis</a>. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.</p> |
42 |
|
43 |
<div class="demo-description"> |
44 |
<p>Confirm an action that may be destructive or important. Set the <code>modal</code> option to true, and specify primary and secondary user actions with the <code>buttons</code> option.</p> |
45 |
</div> |
46 |
</body> |
47 |
</html> |