Jeff Pihach![]()
Allows you to group and style AutoComplete results in the result list while maintaining keyboard navigation and aira support.
<script src="http://yui.yahooapis.com/3.6.0pr4/build/yui/yui-min.js"></script>YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.08.01-13-16'
}).use('gallery-autocomplete-list-group', function(Y) {
var AC = new Y.AutoComplete({
inputNode: '#acinput',
source: results,
resultFilters: 'charMatch',
resultTextLocator: 'description',
//AutoComplete Group
group: true,
groupFilter: 'source',
groupOrder: ['sku', 'description']
});
// Changing the built in templates
AC.GROUP_TEMPLATE = '<ul class="border"></ul>';
AC.DIVIDER_TEMPLATE = '<div class="divider"></div>';
AC.render();
});
© 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