forked from GianlucaGuarini/jQuery.BlackAndWhite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ajax-contents.html
81 lines (75 loc) · 1.65 KB
/
ajax-contents.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Gianluca Guarini - black and white image jQuery plug-in</title>
<meta name="Description" content="This jQuery plug-in can easly convert every colored image (in an html page) into a B&W greyscale image." />
<meta name="Keywords" content="JavaScript,HTML5,jQuery.BlackAndWhite.js,jQuery plugin" />
<link href='http://fonts.googleapis.com/css?family=Rosario' rel='stylesheet' type='text/css'>
<style type="text/css">
body {
margin: 20px auto;
padding: 0;
color:#999;
font-family: 'Rosario', sans-serif;
width:960px;
}
a {
color:#0072ca;
}
img {
border:none;
}
iframe {
display:inline;
float: left;
}
#wrapper {
list-style:none;
margin:10px 0;
float:left;
padding:0;
}
#wrapper li {
float:left;
margin: 15px 30px 15px 0;
}
#wrapper li.last {
float:left;
margin: 15px 0 15px;
}
</style>
<link href="css/BlackAndWhite.css" rel="stylesheet">
<script src="js/jquery.min.js"></script>
<script src="js/jQuery.BlackAndWhite.js"></script>
</head>
<body>
<h1>Crossbrowser Html5 Black and white jQuery plug in</h1>
<h2>Responsive demo</h2>
<h3>Demo</h3>
<ul id="wrapper">
</ul>
<button class="ajaxTrigger">Load Images</button>
<br />
<small>
©
<a href="http://www.gianlucaguarini.com" target="_blank">Gianluca Guarini 2012</a>
</small>
<script>
//init
$(".ajaxTrigger").on("click",function() {
$.ajax({
url:"demo.html",
success: function ( data ) {
var $list = $(data).filter("#wrapper").find("li"),
$images = $list.find("img");
$("#wrapper").append($list);
$images.on("load",function (){
$(this).parent().BlackAndWhite();
});
}
})
});
</script>
</body>
</html>