index.html
1.41 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
<!doctype html>
<html>
<head>
<link type="text/css" rel="stylesheet" media="screen" href="chosen.css">
<style>
#states-select, #states-multi-select { width: 600px; }
</style>
</head>
<body>
<a href="https://github.com/ksykulev/chosen-ajax-addition"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a>
<p>Type one of the 50 states to begin</p>
<h2>Single Select</h2>
<select id="states-select" name="states-select">
<option value=""></option>
</select>
<h2>Multi Select</h2>
<select id="states-multi-select" name="states-multi-select" multiple>
<option value=""></option>
</select>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="chosen.jquery.js"></script>
<script type="text/javascript" src="chosen.ajaxaddition.jquery.js"></script>
<script>
$('#states-select').ajaxChosen({
dataType: 'json',
type: 'GET',
url:'search.php'
},{
loadingImg: 'loading.gif',
});
$('#states-multi-select').ajaxChosen({
dataType: 'json',
type: 'POST',
url:'search.php'
},{
loadingImg: 'loading.gif'
});
</script>
</body>
</html>