Skip to content

Instantly share code, notes, and snippets.

@laffy
Created November 16, 2012 10:21
Show Gist options
  • Save laffy/4086208 to your computer and use it in GitHub Desktop.
Save laffy/4086208 to your computer and use it in GitHub Desktop.
$('#search_text').autocomplete({
source: "/search_options",
minLength: 3,
select: function(event, ui) {
$('#search_id').val(ui.item.id);
$('#search_type').val(ui.item.type);
return $('#search_form').submit();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment