forked from emposha/FCBKcomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
63 lines (57 loc) · 2.53 KB
/
index.html
File metadata and controls
63 lines (57 loc) · 2.53 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>FCBKcomplete Demo</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="jquery.fcbkcomplete.js" type="text/javascript" charset="utf-8">
</script>
</head>
<body id="test">
<h1>FCBKcomplete Demo</h1>
<div id="text">
</div>
<form action="submit.php" method="POST" accept-charset="utf-8">
<select id="select3" name="select3" class="fb-select">
<option value="sleep" class="selected">sleep</option>
<option value="sport">sport</option>
<option value="freestyle">freestyle</option>
</select>
<br/>
<br/>
<input type="submit" value="Send">
</form>
<button type="button" id="btn-get-items">get Items</button>
<script type="text/javascript">
jQuery(function($){
$(".fb-select").fcbkcomplete({
//json_url: "data.txt",
getData: function(text, done){
done([
{key: "Cupcake", value: "Cupcake"},
{key: "Donut", value: "Donut"},
{key: "Eclair", value: "Eclair"},
{key: "Froyo", value: "Froyo"},
{key: "Gingerbread", value: "Gingerbread"},
{key: "Honeycomb", value: "Honeycomb"},
{key: "IceCreamSandwich", value: "IceCreamSandwich"}
])
},
addontab: true,
maxitems: 10,
input_min_size: 0,
height: 10,
cache: true,
newel: true,
select_all_text: "select"
});
$('#btn-get-items').click(function(){
var items = $("#select3").fcbkcomplete('getItems');
alert(items);
});
});
</script>
<div id="testme"></div>
</body>
</html>