2 Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3 Code licensed under the BSD License:
4 http://developer.yahoo.com/yui/license.html
8 YUI.add('autocomplete-plugin', function(Y) {
11 * Binds an AutoCompleteList instance to a Node instance.
13 * @module autocomplete
14 * @submodule autocomplete-plugin
19 * Binds an AutoCompleteList instance to a Node instance.
27 * Y.one('#my-input').plug(Y.Plugin.AutoComplete, {
28 * source: 'select * from search.suggest where query="{query}"'
31 * // You can now access the AutoCompleteList instance at Y.one('#my-input').ac
34 * @class Plugin.AutoComplete
35 * @extends AutoCompleteList
38 var Plugin = Y.Plugin;
40 function ACListPlugin(config) {
41 config.inputNode = config.host;
44 if (!config.render && config.render !== false) {
48 ACListPlugin.superclass.constructor.apply(this, arguments);
51 Y.extend(ACListPlugin, Y.AutoCompleteList, {}, {
52 NAME : 'autocompleteListPlugin',
54 CSS_PREFIX: Y.ClassNameManager.getClassName('aclist')
57 Plugin.AutoComplete = ACListPlugin;
58 Plugin.AutoCompleteList = ACListPlugin;
61 }, '3.3.0' ,{requires:['autocomplete-list', 'node-pluginhost']});