-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (42 loc) · 1.29 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
<style type="text/css">
img {
border: 1px solid #ddd;
border-radius: 4px;
padding: 5px;
margin: 10px;
display: inline-block;
}
</style>
</head>
<script language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script language="javascript" src="artObject.js"></script>
<script language="javascript" src="GalleryList.js"></script>
<body>
<h2 style='padding:5px 5px;'>Homework 6 <br> Max Ramer <br> 10/22/19 <hr> </h2>
</body>
<script language="javascript">
buildGallery(GalleryList);
$(document).ready(function() {
for (i = 0; i < GalleryList.length; i++) {
$("#" + GalleryList[i].id).mouseenter(function() {
$("#preview").hide();
$("#preview").html("<img src='" + this.src + "' name='" + this.name + "Big' id='" + this.id + "' width='40%' height='40%'>");
$("#preview").fadeIn(300);
});
$(".galleryItem").click(function() {
$("#info").html("<h3 style='text-align:center'>Title: " + this.name + "<br> Price: $" + GalleryList[this.id].price + " million</h3>");
setTimeout(function() {
$("#info").html(" ");
},5000);
});
$("#" + GalleryList[i].id).mouseout(function() {
$("#preview").hide();
});
}
});
</script>
</html>