When some one type in text box the auto suggest showing all the results but i dont want like that.
i want like this:
when some one searches An or Ac like that then ActionScript (Anushka) should come to the auto suggest list based on the starting letter min 2 character and it should not display all the tags which contains the An
here is my below code i have tried so far,kindly help me to resolve it
Code: Select all
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Autocomplete - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script>
$(function() {
var availableTags = [
"ActionScript (Anushka)",
"AppleScript (Ananth)",
"Asp (Gopal)",
"BASIC (Bharath)",
"C (Charles)",
];
$( "#tags" ).autocomplete({
source: availableTags
});
});
</script>
</head>
<body>
<div class="ui-widget">
<label for="tags">Tags: </label>
<input id="tags">
</div>
</body>
</html>