-
Notifications
You must be signed in to change notification settings - Fork 1
/
demo.html
96 lines (88 loc) · 1.84 KB
/
demo.html
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
84
85
86
87
88
89
90
91
92
93
94
95
96
<html>
<head>
<title>List View</title>
<link rel="stylesheet" href="bootstrap/css/bootstrap.css">
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="jquery.listview.js"></script>
</head>
<body>
<div class="container">
<h1>List View Demo page</h1>
<p>jQuery plugin allowing to use ul and li element to have similar effect of iOS ListView</p>
<ul class="nestable-view">
<li>
Campus 1
<ul>
<li>Block A
<ul>
<li>Room A1</li>
<li>Room A2</li>
<li>Room A3</li>
</ul>
</li>
<li>Block B
<ul>
<li>Room B1</li>
<li>Room B2</li>
<li>Room B3</li>
</ul>
</li>
</ul>
</li>
<li>
Campus 2
<ul>
<li>Block C
<ul>
<li>Room C1</li>
<li>Room C2</li>
<li>Room C3</li>
</ul>
</li>
<li>Block D</li>
</ul>
</li>
</ul>
</div>
<style type="text/css">
.nestable-container {
overflow:hidden;
width:200px;
height:300px;
position:relative;
z-index:0;
border: 2px solid #333;
}
.nestable-view {
width:200px;
}
.nestable-view ul{
display:inline-block;
left:0px;
top:0px;
background-color:white;
width:200px;
height:300px;
}
ul.nestable-view,.nestable-view ul{
position:absolute;
padding:0;
margin:0;
}
.nestable-view li {
list-style:none;
background-image: -webkit-linear-gradient(top, #333, #222);
background-image: -moz-linear-gradient(top, #333, #222);
background-image: -o-linear-gradient(top, #333, #222);
background-image: -ms-linear-gradient(top, #333, #222);
background-image: linear-gradient(top, #333, #222);
color:white;
height:30px;
padding: 10px 0 0px 10px;
}
</style>
<script type="text/javascript">
$('.nestable-view').listView();
</script>
</body>
</html>