forked from sebarmeli/JAIL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample3_clickOnPlaceholder.html
executable file
·44 lines (42 loc) · 1.28 KB
/
example3_clickOnPlaceholder.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
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>jQuery Asynch Image Loader - Example 3 - Image loaded after you click on placeholder</title>
<link href="css/style.css" rel="stylesheets" />
<script type="text/javascript" src="../lib/jquery.js"></script>
<script type="text/javascript" src="../src/jail.js"></script>
<script type="text/javascript">
$(function(){
$('img.lazy').jail({
event: 'click',
placeholder : 'img/loader.gif',
effect: 'fadeIn',
speed : 'slow'
});
});
</script>
</head>
<body>
<div id="wrapper">
<div class="content">
<p>Images loaded after you click on placeholder</p>
<ul>
<li class="clickable">
<img class="lazy" data-src="img/sample1_th.jpg" src="img/blank.gif"/>
</li>
<li class="clickable">
<img class="lazy" data-src="img/sample2_th.jpg" src="img/blank.gif"/>
</li>
<li class="clickable">
<img class="lazy" data-src="img/sample3_th.jpg" src="img/blank.gif"/>
</li>
<li class="clickable">
<img class="lazy" data-src="img/sample5_th.jpg" src="img/blank.gif"/>
</li>
</ul>
</div>
</div>
</body>
</html>