-
Notifications
You must be signed in to change notification settings - Fork 0
/
gallery.html
52 lines (46 loc) · 1.25 KB
/
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
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" media="all" href="style.css">
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
<script>
$(document).ready(function () {
$('body').on('click', '.img_gallery', function () {
console.log("Hello!");
$('.popup').css({
"display": "block"
});
});
$('body').on('click', '#back', function () {
console.log("Hello!");
$('.popup').css({
"display": "none"
});
});
var folder = "./data/";
$.ajax({
url: folder,
success: function (data) {
$(data).find("a").attr("href", function (i, val) {
if (val.match(/\.(jpe?g|png|gif)$/) && val.includes("Big")) {
$(".container_gallery").append("<img class='img_gallery' src='" + folder + val + "'>");
}
});
}
});
});
</script>
</head>
<html>
<body>
<h1 class="galleryh1">Select your photo</h1>
<div class="container_gallery">
</div>
<div class="popup cover"></div>
<form class="popup contact contact_confirm" action="pay.html">
<h1>Sure?</h1>
<button type="submit" id="submit">Yes</button>
<div class="popup" id="back">No</div>
</form>
</body>
</html>