jQuery(function(){ jQuery('#s').each(function(i){ jQuery(this).autocomplete('http://www.trendtablet.com/wp-content/plugins/kau-boys-autocompleter/autocompleter_results.php?lang=', { highlight: false, scroll: false, formatItem: function(value){ return value[0]; }, formatResult: function(value) { return value[0].replace(/<\/?[^>]+>/gi, ''); } }) .result(function(event, value){ location.href = value[1]; }); }); });