diff options
author | Chi Cheng <cloudream@gmail.com> | 2008-08-08 06:58:56 +0000 |
---|---|---|
committer | Chi Cheng <cloudream@gmail.com> | 2008-08-08 06:58:56 +0000 |
commit | c452a8a9865f7ec450947b2d90065e13a10281aa (patch) | |
tree | 155bd0eaa8a014f517ed4893e5df5a629b823c26 /demos | |
parent | 1064e63967abddf921681816d9696d0fc0a86b4b (diff) | |
download | jquery-ui-c452a8a9865f7ec450947b2d90065e13a10281aa.tar.gz jquery-ui-c452a8a9865f7ec450947b2d90065e13a10281aa.zip |
Functional demos: init autocomplete
Diffstat (limited to 'demos')
-rw-r--r-- | demos/functional/templates/ui.autocomplete.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/demos/functional/templates/ui.autocomplete.html b/demos/functional/templates/ui.autocomplete.html new file mode 100644 index 000000000..fc34fb510 --- /dev/null +++ b/demos/functional/templates/ui.autocomplete.html @@ -0,0 +1,32 @@ +<script type="text/javascript">
+
+ var autocomplete_data = '["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>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>
\ No newline at end of file |