-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.html
428 lines (402 loc) · 16 KB
/
example.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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Overalls: Easily Customizable Overlays for JQuery 1.4</title>
<link rel="stylesheet" href="style-popups.css" type="text/css" media="all" />
<style>
body {
background-color: #ddd; /*#2e2e2e is nice too*/
color: #fff;
font-family: Arial, "MS Trebuchet", sans-serif;
letter-spacing: 0.0em;
font-size: 14.5px;
}
div#content {
width:800px;
padding:15px 30px 45px 30px;
margin: 60px auto 80px auto;
border:1px solid #eee;
background: #fff;
color: #1d1d1d;
-moz-border-radius: 8px; /* FF1+ */
-webkit-border-radius: 8px; /* Saf3+, Chrome */
border-radius: 8px; /* Opera 10.5, IE 9 */
}
a, a:visited{color:#00325B;}
a:hover{color:#004C96}
h3{margin-top:25px;}
pre{
background: #eee;
border:1px solid #ddd;
padding: 20px 0px 5px 0px;
}
div.note{
color:#EAA028;
font-weight:bold;
font-size:0.8em;
margin:10px;
}
div.custom_overlay {
color: #1d1d1d;
width: 755px;
height: 929px;
margin: 0 auto 0 auto;
background: url(custom-overlay.png) no-repeat 0 0;
}
div.custom-inner{
padding:40px 60px;
}
.custom-inner span{
color:#009BFF;
}
</style>
<script language="javascript" type="text/javascript" src="jquery.js"></script>
<script language="javascript" type="text/javascript" src="jquery.overalls.js"></script>
<script id="source" language="javascript" type="text/javascript">
$(function () {
lorem_ipsum = $('div#lorem-ipsum').html()
basic_html = $('div#basic-example').append(lorem_ipsum).html()
$('a.basic-overlay').click(function(){
$.overalls(basic_html)
})
close_link_html = $('div#close-link').html()
$('a.close-link-overlay').click(function(){
overalls = $.overalls(close_link_html)
$('a.close-overlay').click(function(){
overalls.close()
})
})
custom_html = $('div#custom-example').html()
$('a.custom-overlay').click(function(){
$.overalls(custom_html, {cssClass: 'custom_overlay'})
})
pre_existing_html = $('div#pre-existing-example').html()
$('a.pre-existing-overlay').click(function(){
$.overalls(pre_existing_html, {blank: true})
})
$('a.custom-transparency-overlay-1').click(function(){
$.overalls(basic_html, {opacity: 0.1, color:'#f0f'})
})
$('a.custom-transparency-overlay-2').click(function(){
$.overalls(basic_html, {opacity: 0.5, color:'#FFDF95'})
})
$('a.custom-transparency-overlay-3').click(function(){
$.overalls(basic_html, {opacity: 1, color:'#000'})
})
$('a.custom-transparency-overlay-4').click(function(){
$.overalls(basic_html, {opacity: 0.75, color:'#fff'})
})
});
</script>
</head>
<div id="content">
<div id="lorem-ipsum" style="display:none;">
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.
</div>
<div id="basic-example" style="display:none;">
<h3>This is the basic overlay</h3>
</div>
<div id="close-link" style="display:none;">
boom!
<a href="javascript:void(0)" class="close-overlay" style="float:right">close me</a>
</div>
<div id="custom-example" style="display:none;">
<div class="custom-inner">
<h3>Custom stuff!</h3>
<p>It needs to look <span>different</span>, so it stands out!</p>
</div>
</div>
<div id="pre-existing-example" style="display:none;">
<div id="popup-culture-1" class="popup">
<div class="popup-cnt">
<div class="popup-header">
<h2>Evaluation: <span>11% Complete</span></h2>
<h3>Understanding things</h3>
<p>Please list the 9 values that best describe you and the 9 that don’t describe you at all. By identifying the ones that most and least characterize you. </p>
</div>
<div class="culture-listing">
<div class="culture-listing-item">
<div class="listing-number">1.</div>
<div class="listing-title">Creativity </div>
<div class="listing-results">
<span class="result-no">No</span>
<span class="result-na">Na</span>
<span class="result-ya">Ya</span>
<span class="result-yes chosen-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">2.</div>
<div class="listing-title">Yoga Style </div>
<div class="listing-results">
<span class="result-no">No</span>
<span class="result-na chosen-na">Na</span>
<span class="result-ya">Ya</span>
<span class="result-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">3.</div>
<div class="listing-title">Juggling </div>
<div class="listing-results">
<span class="result-no chosen-no">No</span>
<span class="result-na">Na</span>
<span class="result-ya">Ya</span>
<span class="result-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">4.</div>
<div class="listing-title">Being Competitive </div>
<div class="listing-results">
<span class="result-no">No</span>
<span class="result-na">Na</span>
<span class="result-ya chosen-ya">Ya</span>
<span class="result-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">5.</div>
<div class="listing-title">Being highly organized </div>
<div class="listing-results">
<span class="result-no chosen-no">No</span>
<span class="result-na">Na</span>
<span class="result-ya">Ya</span>
<span class="result-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">6.</div>
<div class="listing-title">Being distinctive </div>
<div class="listing-results">
<span class="result-no">No</span>
<span class="result-na">Na</span>
<span class="result-ya">Ya</span>
<span class="result-yes chosen-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">7.</div>
<div class="listing-title">Enthusiam for the job </div>
<div class="listing-results">
<span class="result-no">No</span>
<span class="result-na chosen-na">Na</span>
<span class="result-ya">Ya</span>
<span class="result-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">8.</div>
<div class="listing-title">Being quick to take advantage of opportunities </div>
<div class="listing-results">
<span class="result-no">No</span>
<span class="result-na">Na</span>
<span class="result-ya chosen-ya">Ya</span>
<span class="result-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">9.</div>
<div class="listing-title">Desiring a well definined role </div>
<div class="listing-results">
<span class="result-no chosen-no">No</span>
<span class="result-na">Na</span>
<span class="result-ya">Ya</span>
<span class="result-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">10.</div>
<div class="listing-title">Being quick to take advantage of opportunities </div>
<div class="listing-results">
<span class="result-no">No</span>
<span class="result-na chosen-na">Na</span>
<span class="result-ya">Ya</span>
<span class="result-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">11.</div>
<div class="listing-title">Being quick to take advantage of opportunities </div>
<div class="listing-results">
<span class="result-no">No</span>
<span class="result-na chosen-na">Na</span>
<span class="result-ya">Ya</span>
<span class="result-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">12.</div>
<div class="listing-title">Being quick to take advantage of opportunities </div>
<div class="listing-results">
<span class="result-no">No</span>
<span class="result-na">Na</span>
<span class="result-ya">Ya</span>
<span class="result-yes chosen-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">13.</div>
<div class="listing-title">Enthusiam for the job </div>
<div class="listing-results">
<span class="result-no">No</span>
<span class="result-na chosen-na">Na</span>
<span class="result-ya">Ya</span>
<span class="result-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">14.</div>
<div class="listing-title">Being quick to take advantage of opportunities </div>
<div class="listing-results">
<span class="result-no">No</span>
<span class="result-na">Na</span>
<span class="result-ya chosen-ya">Ya</span>
<span class="result-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">15.</div>
<div class="listing-title">Desiring a well definined role </div>
<div class="listing-results">
<span class="result-no chosen-no">No</span>
<span class="result-na">Na</span>
<span class="result-ya">Ya</span>
<span class="result-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">16.</div>
<div class="listing-title">Being quick to take advantage of opportunities </div>
<div class="listing-results">
<span class="result-no">No</span>
<span class="result-na chosen-na">Na</span>
<span class="result-ya">Ya</span>
<span class="result-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item">
<div class="listing-number">17.</div>
<div class="listing-title">Being quick to take advantage of opportunities </div>
<div class="listing-results">
<span class="result-no">No</span>
<span class="result-na chosen-na">Na</span>
<span class="result-ya">Ya</span>
<span class="result-yes">Yes</span>
</div>
</div>
<div class="culture-listing-item last-listing-item">
<div class="listing-number">18.</div>
<div class="listing-title">Being quick to take advantage of opportunities </div>
<div class="listing-results">
<span class="result-no">No</span>
<span class="result-na">Na</span>
<span class="result-ya">Ya</span>
<span class="result-yes chosen-yes">Yes</span>
</div>
</div>
</div>
<div class="popup-buttons">
<div class="cl"> </div>
<a href="#" class="next-button">Next</a>
<a href="#" class="save-for-now-button">Save for Now</a>
<div class="cl"> </div>
</div>
<div class="popup-bottom">
<p>Estimated time: 5 mins</p>
</div>
</div>
</div>
</div>
<h1>
JQuery.Overalls: Easily Customizable Overlays
</h1>
<h3>
Overlays, Lightboxes, Dialogs Oh My!
</h3>
<p>
This plugin is for developers and designers who want precise control over their overlays/lightboxs/dialogs.
</p>Lots of plugins out there make you use their design and add a ton of html to the page making customization not easy and brittle.
<h3>Overalls layout is stupid simple:</h3>
<ul>
<li>Places one huge semi-transparent div over the whole page.</li>
<li>Adds one completely transparent div over the semi-transparent div in which to place your overlay div, it has no height.</li>
<li>Appends the overalls-overlay div to the fully transparent div</li>
</ul>
<h3>
Opening Overalls (and putting html in it):
</h3>
<p>Overalls is made to not be too smart, any html you give it, it'll put it in the overalls-overlay div</p>
<pre>
html = $('div#html-example').html()
$.overalls(html)
</pre>
<p><a href="javascript:void(0)" class="basic-overlay">Try the basic example</a></p>
<h3>Closing Overalls</h3>
<p>
Its pretty easy, you get a click handler on the transparent div and a keypress event on the escape key that closes the overlay.
</p>
<p>
Optionally, you can call the "close" method on the Overalls object. It will fadeout the divs and remove them from the page. </p>
<div class="note">Note: Overalls does not provide you with a close button, that's up to you to handle.</div>
<pre>
// For instance you might want a close button in the overlay:
overalls = $.overalls(html)
$('a.close_overlay').click(function(){
overalls.close()
})
</pre>
<p><a href="javascript:void(0)" class="close-link-overlay">Try the basic example with a close link</a></p>
<h3>Customizing Overalls</h3>
<p>Overalls has three modes: basic, css-customizable, and blank</p>
<ul>
<li>
<h4>Basic</h4>
<p>Basic mode is just like the basic example above, a plain white div, with a black semi-transparent background</p>
<p>Pop in your html and you're done.</p>
</li>
<li>
<h4>CSS-Customizable</h4>
<p>Customizable mode allows you to set the css class of the overlay div.</p>
<p>An example is below</p>
</li>
<li>
<h4>Blank</h4>
<p>Blank mode does not style the overlay div at all.</p>
<p>This mode is intended for you to place your fully styled html into the overlay and not worry about any other styles affecting your content</p>
<p>An example of is outlined below</p>
</li>
</ul>
<h3>CSS Customizable</h3>
<p>You can override the blank divs styling using a css class:
</p>
<pre>
html = $('div#html-example').html()
$.overalls(html, {cssClass: 'custom-overlay'})
</pre>
<p><a href="javascript:void(0)" class="custom-overlay">Try the custom css class example</a></p>
<h3>Blank Mode (I have the html, just give me a blank div!)</h3>
<p>Done, just set "blank" to true in Overalls options: </p>
<pre>
html = $('div#pre-existing-html').html()
$.overalls(html, {blank: true})
</pre>
<p><a href="javascript:void(0)" class="pre-existing-overlay">Try the pre-existing perfect html example</a></p>
<h3>Transparency Customization:</h3>
<p>You can set the color and opacity of the transparent div like so:</p>
<pre>
$.overalls(html, {opacity: 0.1, color:'#f0f'})
</pre>
<p><a href="javascript:void(0)" class="custom-transparency-overlay-1">Try the custom transparency example 1</a></p>
<p><a href="javascript:void(0)" class="custom-transparency-overlay-2">Try the custom transparency example 2</a></p>
<p><a href="javascript:void(0)" class="custom-transparency-overlay-3">Try the custom transparency example 3</a></p>
<p><a href="javascript:void(0)" class="custom-transparency-overlay-4">Try the custom transparency example 4</a></p>
</div>