Skip to content

Instantly share code, notes, and snippets.

@johnciacia
Created May 14, 2011 19:12
Show Gist options
  • Save johnciacia/972520 to your computer and use it in GitHub Desktop.
Save johnciacia/972520 to your computer and use it in GitHub Desktop.
autocomplete.html
<!DOCTYPE html>
<html>
<head>
<title>jQuery Autocomplete Demo</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquer
y-ui.min.js" type="text/javascript"></script>
</head>
<body>
<input type="text" id="autocomplete" />
<script type="text/JavaScript">
$("input#autocomplete").autocomplete({
source: ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"],
select: function(event, ui) { alert(ui.item.value); }
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment