3
Copyright 2012 Yahoo! Inc. All rights reserved.
4
Licensed under the BSD License.
5
http://yuilibrary.com/license/
7
YUI.add('autocomplete-plugin', function(Y) {
10
Binds an AutoCompleteList instance to a Node instance.
13
@submodule autocomplete-plugin
17
Binds an AutoCompleteList instance to a Node instance.
21
Y.one('#my-input').plug(Y.Plugin.AutoComplete, {
22
source: 'select * from search.suggest where query="{query}"'
25
// You can now access the AutoCompleteList instance at Y.one('#my-input').ac
27
@class Plugin.AutoComplete
28
@extends AutoCompleteList
31
var Plugin = Y.Plugin;
33
function ACListPlugin(config) {
34
config.inputNode = config.host;
37
if (!config.render && config.render !== false) {
41
ACListPlugin.superclass.constructor.apply(this, arguments);
44
Y.extend(ACListPlugin, Y.AutoCompleteList, {}, {
45
NAME : 'autocompleteListPlugin',
47
CSS_PREFIX: Y.ClassNameManager.getClassName('aclist')
50
Plugin.AutoComplete = ACListPlugin;
51
Plugin.AutoCompleteList = ACListPlugin;
54
}, '3.5.0' ,{requires:['autocomplete-list', 'node-pluginhost']});