I get this JS error:
jquery-1.5.1.min.js:16Uncaught TypeError: Cannot set property \'_renderItem\' of undefined
d.d.extend._Deferred.f.resolveWithjquery-1.5.
why not just wrap the autocomplete code in a check to see if that element exists?
something like this:
if ($'#myElementId').length) {
$('#myElementId').data( "autocomplete" )._renderItem = function( ul, item ) {
return $( "" )
.data( "item.autocomplete", item )
.append( "" + item.topic.name + "" )
.appendTo( ul );
};
}