forked from prydie/jQuery-GreyScale-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.html
38 lines (37 loc) · 1.02 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery GreyScale Plugin</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="greyScale.js"></script>
</head>
<style>
a {
display: block;
text-align: center;
}
</style>
<body>
<a href="image.png">
<img src="image.jpg" alt="Image" class="greyScale" />
</a>
<a href="http://www.pryde-design.co.uk">
<img src="http://www.pryde-design.co.uk/pd-header.png" alt="Image" class="greyScale" />
</a>
<script>
$(function() {
// fade in the grayscaled images to avoid visual jump
$('.greyScale').hide().fadeIn(1000);
});
// user window.load to ensure images have been loaded
$(window).load(function () {
$('.greyScale').greyScale({
// call the plugin with non-defult fadeTime (default: 400ms)
fadeTime: 500,
reverse: false
});
});
</script>
</body>
</html>