aboutsummaryrefslogtreecommitdiffstats
path: root/demos/functional/templates/ui.autocomplete.html
blob: 4811693f93843643abb603cbb3deae70b89cd32e (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
<script type="text/javascript">

	var autocomplete_data = '["aero", "airplane", "book","movie","music","sports","skating","swim"]';

	var model = {
		
		renderAt: '#containerDemo',

		title: 'Autocomplete Demos',
		
		demos: [

			{
				title: 'Simple autocomplete',
				desc: 'With few lines of code you could build a autocomplete. You can try more options on the fly! ',
				html: '<input id="autocomplete" type="text" /> (Try type <em>a</em>, <em>m</em> or <em>s</em>)',
				destroy: '$("#autocomplete").autocomplete("destroy");',
				options: [
					{ desc: 'Attach a autocomplete', source: '$("#autocomplete").autocomplete({data:'+autocomplete_data+'});' }
				]
			}

		]
	};

	$(function(){

		uiRenderDemo(model);

	});

</script>