Skip to content

Instantly share code, notes, and snippets.

@ahawkins
Created September 9, 2010 23:56
Show Gist options
  • Save ahawkins/572798 to your computer and use it in GitHub Desktop.
Save ahawkins/572798 to your computer and use it in GitHub Desktop.
$(something).autocomplete(option).data( "autocomplete" )._renderItem = function( ul, item) {
var term = this.term; // what the user typed into the box, can do some fanciness now
return $( "<li></li>" )
.data( "item.autocomplete", item )
.append( $( "<a></a>" ).text( item.label ) )
.appendTo( ul );
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment