Is there a way to customize the appearance of my list (<ul>
) in the following code snippet?
$.widget( "custom.catcomplete", $.ui.autocomplete, {
_renderMenu: function( ul, items ) {
var self = this,
currentCategory = "";
$.each( items, function( index, item ) {
if ( item.category != currentCategory ) {
ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
currentCategory = item.category;
}
self._renderItem( ul, item );
});
}
});
I want to apply my own styling to the <ul>
tag. Can someone guide me on how I can achieve this? Thank you!