xxxxxxxxxx
1
<form>
2
<div class="md-form">
3
<input type="search" id="form-autocomplete" class="form-control mdb-autocomplete">
4
<button class="mdb-autocomplete-clear">
5
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg">
6
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" />
7
<path d="M0 0h24v24H0z" fill="none" />
8
</svg>
9
</button>
10
<label for="form-autocomplete" class="active">What is your favorite US state?</label>
11
</div>
12
</form>
1
1
xxxxxxxxxx
1
var states = [
2
"Alabama",
3
"Alaska",
4
"Arizona",
5
"Arkansas",
6
"California",
7
"Colorado",
8
"Connecticut",
9
"Delaware",
10
"Florida",
11
"Georgia",
12
"Hawaii",
13
"Idaho",
14
"Illnois",
15
"Indiana",
16
"Iowa",
17
"Kansas",
18
"Kentucky",
19
"Louisiana",
20
"Maine",
21
"Maryland",
22
"Massachusetts",
23
"Michigan",
24
"Minnesota",
25
"Mississippi",
26
"Missouri",
27
"Montana",
28
"Nebraska",
29
"Nevada",
30
"New Hampshire",
31
"New Jersey",
32
"New Mexico",
33
"New York",
34
"North Carolina",
35
"North Dakota",
36
"Ohio",
37
"Oklahoma",
38
"Oregon",
39
"Pennsylvania",
40
"Rhode Island",
41
"South Carolina",
42
"South Dakota",
43
"Tennessee",
44
"Texas",
45
"Utah",
46
"Vermont",
47
"Virginia",
48
"Washington",
49
"West Virginia",
50
"Wisconsin",
51
"Wyoming"
52
];
53
54
$('#form-autocomplete').mdbAutocomplete({
55
data: states
56
});
Console errors: 0