aboutsummaryrefslogtreecommitdiffstats
path: root/demos/functional/templates/ui.dialog.html
blob: 75e87b8756f2bc76dc19f7f2f0ccaa05e8dbda4a (plain)
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
<script type="text/javascript">

	var model = {
		
		renderAt: '#containerDemo',

		title: 'Dialog Demos',
		
		demos: [

			{
				title: 'Simple dialog',
				desc: 'With few lines of code you could build a dialog. You can try more options on the fly!',
				html: '<div id="dialog">jQuery UI Dialog</div>',
				destroy: '$("#dialog").dialog("destroy");',
				options: [
					{ desc: 'Make a simple dialog', source: '$("#dialog").dialog();' },
					{ desc: 'Modal dialog', source: '$("#dialog").dialog({ modal: true });' },
					{ desc: 'Modal dialog with overlay', source: '$("#dialog").dialog({ modal: true, overlay: { opacity: 0.5, background: "black" } });' },
					{ desc: 'With buttons', source: '$("#dialog").dialog({buttons: { "Ok": function() { alert("Ok"); }, "Cancel": function() { $(this).dialog("close"); } }});' },
					{ desc: 'Close the dialog', source: '$("#dialog").dialog("close");' }
				]
			}

		]
	};

	$(function(){

		uiRenderDemo(model);

	});

</script>