-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautocompletewidget.html
More file actions
43 lines (37 loc) · 880 Bytes
/
autocompletewidget.html
File metadata and controls
43 lines (37 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<html>
<head>
<link rel="stylesheet" href="jquery-ui/jquery-ui.css">
<link rel="stylesheet" href="jquery-ui/jquery-ui.structure.css">
<link rel="stylesheet" href="jquery-ui/jquery-ui.theme.css">
<style>
#mydiv{
border:3px solid red;
margin:2px;
line-height:5px;
}
#citytextbox
{
margin:5px 0px 5px 0px;;
}
</style>
</head>
<body>
<h3>Autocomplete widget in jQuery UI</h3><br>
<div id="mydiv">
<label>Enter Your Favourite City:</label>
<input id="citytextbox" type="text" placeholder="write here" />
</div>
</body>
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery-ui/jquery-ui.js" type="text/javascript"></script>
<script>
var mycities=["Ranchi","ranchi","Bhubaneswar","Delhi"];
$("#citytextbox").autocomplete({
source:mycities
},{
autofocus:true,
delay:300,
minlength:3//min length of options for the suggestions to come up
});
</script>
</html>