-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
99 lines (85 loc) · 2.36 KB
/
demo.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
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>jQuery hoverme! plugin demo</title>
<link rel="stylesheet" href="styles/demo.css" type="text/css" media="all" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="scripts/jquery.hoverme.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".hoverme-block").hoverme({
opacity: 0.8
});
});
</script>
</head>
<body>
<div class="container">
<h1>jQuery.hoverme demo page</h1>
<div class="hoverme-block">
<div class="hoverme-overlay">
<a href="http://www.marvinlabs.com" class="hoverme-caption">
<span>The Matterhorn peak</span>
</a>
</div>
<div class="hoverme-backdrop">
<a href="http://www.marvinlabs.com">
<img src="images/01.jpg">
</a>
</div>
</div>
<div class="hoverme-block">
<div class="hoverme-overlay">
<a href="http://www.marvinlabs.com" class="hoverme-caption">
<span>Le Louvre</span>
</a>
</div>
<div class="hoverme-backdrop">
<a href="http://www.marvinlabs.com">
<img src="images/02.jpg">
</a>
</div>
</div>
<div class="hoverme-block">
<div class="hoverme-overlay">
<a href="http://www.marvinlabs.com" class="hoverme-caption">
<span>Somewhere in the Alps</span>
</a>
</div>
<div class="hoverme-backdrop">
<a href="http://www.marvinlabs.com">
<img src="images/03.jpg">
</a>
</div>
</div>
<h2>Some more info</h2>
<p>The markup is basically:</p>
<pre>
<div class="hoverme-block">
<div class="hoverme-overlay">
<a href="your link here" class="hoverme-caption">
<span>The caption you wanna show</span>
</a>
</div>
<div class="hoverme-backdrop">
<a href="http://www.marvinlabs.com">
The content of your block which will always be visible
</a>
</div>
</div>
</pre>
<p>To enable the effect, add the following piece of script to your page:</p>
<pre>
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".hoverme-block").hoverme({
opacity: 0.8
});
});
</script>
</pre>
<p>Apart from that, just include the CSS and the script in your page and you're good to go.</p>
</div>
</body>
</html>