autocomplete send to another page
HTML
<link rel="stylesheet" href="http://code.jquery.com/ui/1.8.21/themes/base/jquery-ui.css">
<link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css">
<div id="wrapper">
<input type="text" id="send-along" />
</div>
CSS
#wrapper{margin:10px;}
JavaScript
$(document).ready(function() {
var availableTags = ["http://www.google.com","http://www.yahoo.com",
"http://www.utexas.edu","http://www.facebook.com"];
$("#send-along").autocomplete({
source: availableTags,
select: function(event, ui) {
window.location = (ui.item.value);
return false;
}
}).data("autocomplete")._renderItem = function( ul, item ) {
return $( "<li></li>" )
.data( "item.autocomplete", item )
.append( "<a href='#'>"+ item.value + "</a>" )
.appendTo( ul );
};
});