This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
240 lines (237 loc) · 6.93 KB
/
index.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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Dropp - jQuery Dropdown Replacement</title>
<link href='http://fonts.googleapis.com/css?family=Raleway:100' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="reset.css" media="all">
<link rel="stylesheet" type="text/css" href="dropp.css" media="all">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="jquery.dropp.js"></script>
<style type="text/css">
html,body { font-family: 'Droid Sans', arial, serif; font-size:13px;}
h1 { font-family: 'Raleway', arial, serif; font-size:32px; font-weight:100; margin:1% 0 1% 0;}
.cont_50 { width:48%; margin:0 1% 2% 1%; float:left; }
.cont_100 { width:98%; margin:0 1% 2% 1%; float:left; }
.cont_33 { width:31%; margin:0 1% 2% 1%; float:left; }
/* http://sonspring.com/journal/clearing-floats */
.clear { clear: both; display: block; overflow: hidden; visibility: hidden; width: 0; height: 0; }
code {padding:4px; border: 1px solid #e2e2e2;margin:0 0 10px 0;display:block;}
p {margin:0 0 10px 0;}
h2 {margin:0 0 0.5% 0; font-size: 24px;}
h3 {margin:0 0 0.5% 0; font-size: 16px;}
span.code {font-family:monospace}
</style>
</head>
<body>
<div class="cont_100">
<h1>Dropp - jQuery Dropdown Replacement</h1>
</div>
<div class="cont_100">
<h2>Introduction</h2>
<p>
Dropp is a jQuery plugin which replaces regular droprown menus ( <select> elements ) with stylable alternatives.
</p>
<p>
All you have to do is to initialize the replacer as shown below.
</p>
<code>
$('select').dropp();
</code>
<p>
It'll handle the rest!
</p>
</div>
<div class="clear"> </div>
<div class="cont_100">
<h2>Examples</h2>
</div>
<div class="cont_50">
<h3>Example 1 (Single Choice Select)</h3>
<select name="" id="example_1">
<option value="">Please Select a value</option>
<option value="">Option 1 - 1</option>
<option value="">Option 1 - 2</option>
<option value="">Option 1 - 3</option>
</select>
</div>
<div class="cont_50">
<h3>Example 2 (Multiple Choice Select)</h3>
<select name="" id="example_2" multiple placeholder="Enter Your Placeholder here">
<option value="">Please Select a value</option>
<option value="">Option 2 - 1</option>
<option value="">Option 2 - 2</option>
<option value="">Option 2 - 3</option>
</select>
</div>
<div class="clear"> </div>
<div class="cont_50">
<h3>Example 3 (Multiple Choice Select with "Phrase on Multiple" enabled)</h3>
<select name="" id="example_3" multiple placeholder="Enter Your Placeholder here">
<option value="">Please Select a value</option>
<option value="">Option 3 - 1</option>
<option value="">Option 3 - 2</option>
<option value="">Option 3 - 3</option>
</select>
</div>
<div class="cont_50">
<h3>Example 4 (Using Active Class)</h3>
<select name="" id="example_4" placeholder="Enter Your Placeholder here" class="pq-demo">
<option value="">Option 4 - 1</option>
<option value="">Option 4 - 2</option>
<option value="">Option 4 - 3</option>
</select>
</div>
<div class="clear"> </div>
<div class="cont_50">
<h3>Example 5 (Scroll and Keyboard Support)</h3>
<select name="" id="example_5" placeholder="Enter Your Placeholder here" class="scroll-demo">
<option value="">AA</option>
<option value="">AB</option>
<option value="">AC</option>
<option value="">BA</option>
<option value="">BB</option>
<option value="">BC</option>
<option value="">CA</option>
<option value="">CB</option>
<option value="">CC</option>
</select>
</div>
<div class="clear"> </div>
<div class="cont_100">
<h2>Settings</h2>
<p>You can specify settings by attaching them to initializer. See below for example:</p>
<code>
$('select').dropp({
'phrase_on_multiple' : 'Multiple Choices',
'class_dropdown_wrapper' : 'my_custom_dropdown_wrapper'
});
</code>
</div>
<div class="clear"> </div>
<div class="cont_50">
<h3>Setting: "phrase_on_multiple"</h3>
<p>
Prints the specified text in multiple choice select elements when there are multiple choices selected.
</p>
<p>
Default is <span class="code">false</span>
</p>
<code>
$('select').dropp({
'phrase_on_multiple' : 'Multiple Choices'
});
</code>
</div>
<div class="cont_50">
<h3>Setting: "class_dropdown_wrapper"</h3>
<p>
Sets the css class to be used in the dropdown wrapper element.
</p>
<p>
Default is <span class="code">dropdown_wrapper</span>
</p>
<code>
$('select').dropp({
'class_dropdown_wrapper' : 'my_custom_dropdown_wrapper'
});
</code>
</div>
<div class="clear"> </div>
<div class="cont_50">
<h3>Setting: "class_dropdown_list"</h3>
<p>
Sets the css class to be used in the dropdown list wrapper element.
</p>
<p>
Default is <span class="code">dropdown_list</span>
</p>
<code>
$('select').dropp({
'class_dropdown_list' : 'my_custom_dropdown_list'
});
</code>
</div>
<div class="cont_50">
<h3>Setting: "class_visible_dropdown"</h3>
<p>
Sets the css class to be used in the dropdowns clickable element.
</p>
<p>
Default is <span class="code">dropdown</span>
</p>
<code>
$('select').dropp({
'class_visible_dropdown' : 'my_custom_dropdown'
});
</code>
</div>
<div class="clear"> </div>
<div class="cont_50">
<h3>Setting: "class_option_selected"</h3>
<p>
Sets the css class to be added to an item when it is selected.
</p>
<p>
Default is <span class="code">selected</span>
</p>
<code>
$('select').dropp({
'class_option_selected' : 'my_custom_dropdown_item_selected'
});
</code>
</div>
<div class="cont_50">
<h3>Setting: "class_active_dropdown"</h3>
<p>
Sets the css class which will be added to a dropdowns main anchor when it's option list is open.
</p>
<p>
Default is <span class="code">active</span>
</p>
<code>
$('select').dropp({
'class_active_dropdown' : 'active'
});
</code>
</div>
<div class="clear"> </div>
<div class="cont_50">
<h3>Setting: "substract_list_border_width"</h3>
<p>
Determines if the border width of the dropdown element will be included in list width.
</p>
<p>
Default is <span class="code">true</span>
</p>
<code>
$('select').dropp({
'include_border_width' : false
});
</code>
</div>
<div class="cont_50">
<h3>Setting: "keyboard_support"</h3>
<p>
Enables the keyboard support.
</p>
<p>
Default is <span class="code">true</span>
</p>
<code>
$('select').dropp({
'keyboard_support' : false
});
</code>
</div>
<div class="clear"> </div>
<script type="text/javascript">
$('#example_1, #example_2, #example_4').dropp();
$('#example_3').dropp({
'phrase_on_multiple' : 'Multiple items selected'
});
$('#example_5').dropp();
</script>
</body>
</html>