-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpaintings_gallery.html
80 lines (57 loc) · 1.94 KB
/
paintings_gallery.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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<body>
<div class="top_gallery"><h1 class="paintings"> PAINTINGS</h1>
<p class="under-title"> Award Winning </p></div>
<div class="container-img1">
<a href="img/1.jpg" class="image-link " title="Image Title">
<div id="p1" class="photo"></div>
</a>
<a href="img/2.jpg" class="image-link " title="Image Title">
<div id="p2" class="photo"></div>
</a>
<a href="img/3.jpg" class="image-link " title="Image Title">
<div id="p3" class="photo"></div>
</a>
<a href="img/9.jpg" class="image-link " title="Image Title">
<div id="p4" class="photo"></div>
</a>
<a href="img/5.jpg" class="image-link " title="Image Title">
<div id="p5" class="photo"></div>
</a>
<a href="img/6.jpg" class="image-link " title="Image Title">
<div id="p6" class="photo"></div>
</a>
<a href="img/7.jpg" class="image-link " title="Image Title">
<div id="p7" class="photo"></div>
</a>
<a href="img/8.jpg" class="image-link " title="Image Title">
<div id="p8" class="photo"></div>
</a>
</div>
</body>
<script>
$(function () {
$('.image-link').viewbox();
});
// paintings headings
$(document).on("scroll", function() {
if (doc.scrollTop() > top_gallery) {
$(".top_gallery").addClass("active");
}
else { $(".top_gallery").removeClass("active");}
})
// paintings
const top_gallery = $(".top_gallery").offset().top/2.5;
const cont1 = $(".container-img1").offset().top/2.5;
// paintings images
$(document).on("scroll", function() {
if (doc.scrollTop() > cont1) {
$(".container-img1").addClass("active");
}
else { $(".container-img1").removeClass("active");}
})
</script>
</html>