-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
138 lines (110 loc) · 3.62 KB
/
index.html
File metadata and controls
138 lines (110 loc) · 3.62 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html lang="en">
<head>
<title>Table Progressbarify</title>
<meta charset="utf-8" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="table-progressbarify.js"></script>
<script>
$(document).ready(function(e){
$('[data-progressbarify]').progressbarify();
})
</script>
<style>
body {
padding: 2em 3em;
font-family: 'Roboto', sans-serif;
font-size: 11pt;
background: #fff;
color: #222;
}
h1 {
font-size: 2.25em;
}
h2 {
margin-top: 2em;
font-size: 1.25em;
}
table {
widtd: 100%;
}
td, td {
margin: 5px 0;
padding: 8px;
}
td {
width: 50%;
font-weight: inherit;
text-align: left;
}
td {
width: 50%;
text-align: left;
}
pre, code {
background: #f5f5f5;
color: #333;
}
pre {
padding: .75em 1em;
border-left: .25em solid #ccc;
overflow-x: auto;
}
code {
padding: .25em .5em;
font-size: .9em;
}
.lead {
font-size: 1.25em;
font-style: italic;
color: #999;
}
.note {
font-style: italic;
color: #999;
}
</style>
</head>
<body>
<h1>Table Progressbarify Example</h1>
<p class="lead">jQuery plugin to turn table cells into progress bars.</p>
<h2>Basic Example:</h2>
<table data-progressbarify="1">
<tbody>
<tr>
<td>www.google.com</td>
<td>50</td>
</tr>
<tr>
<td>www.microsoft.com</td>
<td>40</td>
</tr>
<tr>
<td>www.apple.com</td>
<td>30</td>
</tr>
<tr>
<td>www.wikipedia.org</td>
<td>20</td>
</tr>
<tr>
<td>www.example.com</td>
<td>0</td>
</tr>
</tbody>
</table>
<pre>$(document).ready(function(e){
$('[data-progressbarify]').progressbarify();
});</pre>
<p class="note">Note: Progressbarify requires jQuery.</p>
<h2>Arguments:</h2>
<pre>$.fn.progressbarify({
targetColumn: 0, // The column which the progress bar is applied to (default 0).
primaryColour: '#31b0d5', // The colour of the left side of the bar (default #31b0d5).
secondaryColour: 'transparent' // The colour of the right side of the bar (default transparent).
});</pre>
<p class="note">Note: The value of targetColumn can be given as the value of the <code>data-progressbarify</code> attribute on the table.</p>
<p class="note">Note: To apply the progress bar to multiple columns you can chain progressbarify calls, like <code>$('#mytable').progressbarify({ targetColumn: 0 }).progressbarify({ targetColumn: 2 });</code>.</p>
<p class="note">Note: The value of targetColumn should start at 0.</p>
</body>
</html>