mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-02-05 15:05:19 -05:00
Functional demos: init autocomplete
This commit is contained in:
32
demos/functional/templates/ui.autocomplete.html
Normal file
32
demos/functional/templates/ui.autocomplete.html
Normal file
@@ -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>
|
||||
Reference in New Issue
Block a user