// Add the hook in for catcomplete. // We add it here instead of a tw2.jquery_ui template because it must // be executed before *any* other plugins reference jquery ui proper $(document).ready(function() { $.widget( "custom.catcomplete", $.ui.autocomplete, { _renderItem: function( ul, item) { return $( "
  • " ) .data( "item.autocomplete", item ) .append( $( "" ).html( item.label ) ) .appendTo( ul ); } }); });