2008-08-08 06:58:56 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
|
2008-08-24 23:32:11 +00:00
|
|
|
var autocomplete_data = '["aero", "airplane", "book","movie","music","sports","skating","swim"]';
|
2008-08-08 06:58:56 +00:00
|
|
|
|
|
|
|
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! ',
|
2008-08-24 23:32:11 +00:00
|
|
|
html: '<input id="autocomplete" type="text" /> (Try type <em>a</em>, <em>m</em> or <em>s</em>)',
|
2008-08-08 06:58:56 +00:00
|
|
|
destroy: '$("#autocomplete").autocomplete("destroy");',
|
|
|
|
options: [
|
|
|
|
{ desc: 'Attach a autocomplete', source: '$("#autocomplete").autocomplete({data:'+autocomplete_data+'});' }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
$(function(){
|
|
|
|
|
|
|
|
uiRenderDemo(model);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|