I am using the following to autocomplete a search field.
$(document).on('click','li.red-red', function(){
var foo = $('input#search').val($(this).html());
});
It works good, but when I press enter to run the search based off of the prepopulated text a bunch of ++++++ get added to the front and back of the search string.
++++++thing+to+search+here++++++++
It seems like that the autocomplete is leaving space before and after the term it puts into the text input.
Thanks.