forked from luis-almeida/unveil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
149 lines (135 loc) · 5.44 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="Filtrify">
<meta name="keywords" content="javascript, jquery, lazy load, performance, plugin" />
<meta name="author" content="Luís Almeida, Dirk Reimsbach">
<meta name="viewport" content="width=device-width">
<title>jQuery Unveil - A very lightweight plugin to lazy load images</title>
</head>
<style>
body {
background: #FFF;
color: #555;
font-family: "Helvetica Neue", sans-serif;
font-weight: 300;
line-height: 1.7;
padding: 30px 30px 300px 30px;
margin: 0 auto;
max-width: 480px;
}
header {
margin: 100px 0;
}
header p {
color: #CCC;
margin: 0 0 25px 0;
}
header h1 {
color: #000;
font-size: 75px;
line-height: 1;
margin: 0 0 10px 0;
}
header h1 small{
font-size: 16px;
}
h2 {
color: #333;
margin-top: 100px;
font-size: 1em;
}
p {
margin: 15px auto;
}
a {
color: #3595b5;
}
strong {
font-size: 1.5em;
color: #CCC;
}
code {
}
code > span.red {
color: #D14;
}
code > span.blue {
color: #099;
}
ul {
list-style: none;
padding: 0;
}
ul > li {
margin-top: 50px;
text-align: center;
}
ul > li > img {
display: inline-block;
max-width: 100%;
}
.twitter-share-button {
margin-left: 20px;
}
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="jquery-1.9.1.min.js"><\/script>')</script>
<script src="jquery.unveil.js"></script>
<script>
$(function() {
var
logHandler = function() {
console.log($(this).attr("src") + " loaded");
},
options = {
"threshold": 300,
"callback":logHandler
};
$("li img").unveil(options);
});
</script>
<body>
<header>
<h1>Unveil<small>.js</small></h1>
<p>A very lightweight plugin to lazy load images for jQuery or Zepto.js</p>
<p>Modified Version of the original plugin by <a href="https://github.com/luis-almeida/unveil">Luís Almeida</a>
</p>
</header>
<p>Scroll down to see it working.</p>
<ul>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=1" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=2" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=3" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=4" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=5" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=6" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=7" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=8" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=9" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=10" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=11" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=12" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=13" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=14" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=15" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=16" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=17" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=18" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=19" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=20" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=21" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=22" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=23" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=24" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=25" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=26" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=27" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=28" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=29" /></li>
<li><img src="img/loader.gif" data-src="http://lorempixel.com/g/800/600/?ref=30" /></li>
</ul>
</body>
</html>