Greg Hinch![]()
This plugin for Autocomplete checks to see if the list of values is too large for the viewport and resizes it to fit if necessary, with a scrollbar.
<script src="http://yui.yahooapis.com/3.3.0/build/yui/yui-min.js"></script>YUI({
//Last Gallery Build of this module
gallery: 'gallery-2011.02.02-21-07'
}).use('gallery-ac-list-scaler', function(Y) {
var ipt = Y.one ('#complete'),
values = ['foo', 'bar', 'bazz', 'boo'];
ipt.plug({fn : Y.Plugin.AutoComplete, cfg : {
source : values,
resultFilters : [
Y.AutoCompleteFilters.startsWith
],
resultHighlighter : Y.AutoCompleteHighlighters.startsWidth,
plugins : [
{fn : Y.ACListScaler}
]
}});
});| Subject | Author | Date |
|---|---|---|
| Define the Max view item. | vysun | 04/13/11 |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info