-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.html
More file actions
83 lines (77 loc) · 2.14 KB
/
example.html
File metadata and controls
83 lines (77 loc) · 2.14 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>nselects examples</title>
<link rel="stylesheet" href="css/jquery.nselects.css">
<style>
body {
min-height: 500px;
}
.row {
padding: 10px;
margin-bottom: 10px;
}
</style>
</head>
<body>
<form id="example-form" action="example.html" method="get">
<div class="row">
<label for="foo">a normal select</label>
<select id="foo" name="foo" class="ns">
<option value="dee1">DEE</option>
<option value="fo1">FO</option>
<option value="bar2">BAR</option>
<option value="beer3" selected>BEER</option>
<option value="zee4">ZEE</option>
</select>
</div>
<div class="row">
<label for="foo2">a normal select</label>
<select id="foo2" name="foo2" class="ns">
<option value="some stuff a">some stuff</option>
<option value="can go here b">can go here</option>
<option value="or here cc" selected>or here</option>
<option value="can go here too ddd">can go here too</option>
<option value="but not here e">but not there</option>
</select>
</div>
<div class="row">
<label for="foo3">a normal select</label>
<select id="foo3" name="foo3">
<option value="a">some stuff</option>
<option value="a">same stuff</option>
<option value="a">saame stuff</option>
<option value="a">sbaome stuff</option>
<option value="b">can go here</option>
<option value="cc" selected>or here</option>
<option value="ddd">can go here too</option>
<option value="e">but not there</option>
</select>
</div>
<div class="row">
<input type="submit" value="Submit"/>
</div>
</form>
<div id='output'></div>
<a class='test' href="#test">click</a>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script>!window.jQuery && document.write('<script src="js/jquery-1.6.4.min.js"><\/script>')</script>
<script src="js/jquery.nselects.js"></script>
<script>
$(function(){
$('select.ns').nselects({
menuStyle: 'down'
});
$('#example-form').submit(function(e){
$('#output').html($(this).serialize());
return true;
});
$('a.test').click(function(e){
alert('click');
e.preventDefault();
});
});
</script>
</body>
</html>