-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
64 lines (64 loc) · 2.18 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!doctype html>
<html>
<head>
<meta char="utf-8">
<title>Shaun's Website</title>
<link rel="stylesheet" type="text/css" href="style1.css" media="screen">
<script src="script.js"></script>
</head>
<body>
<div>
<div class="videoContainer">
<video autoplay muted>
<source src="coolvid.mp4" type="video/mp4">
</video>
</div>
<div id="change">
</div>
<div class="transBox">
<ul class="navBar container">
<li>Portfolio</li>
<li>Research</li>
<li>Blog</li>
<li>Contact</li>
</ul>
<button class="container buttonStyle1 greenButton">Let's Chat!</button>
</div>
<div class="container">
<button class="buttonStyle transButton">About Me</button>
<h1 class="header">Shaun Chua</h1>
</div>
<div class="projects">
<a href="http://www.localizejs.com"><img src="chua_shaun_profile.jpg" alt="Picture" width="400" height="400" class="alignRight"></a>
<a href="http://gallatin.nyu.edu/"><img src="chua_shaun_profile.jpg" alt="Picture" width="400" height="400" class="alignLeft"></a>
</div>
<div class="projects">
<a href="http://techatnyu.org/"><img src="chua_shaun_profile.jpg" alt="Picture" width="400" height="400" class="alignRight"></a>
<img src="chua_shaun_profile.jpg" alt="Picture" width="400" height="400" class="alignLeft">
</div>
</div>
<script>
$(document).ready(function() {
var scroll_start = 0;
var startchange = $('#change');
var offset = startchange.offset();
if (startchange.length){
$(window).scroll(function() {
scroll_start = $(this).scrollTop();
if(scroll_start > offset.top) {
$(".transBox").css('background-color', "rgba(255,255,255,1");
$('.transBox').css('color', "#000000");
$('.transBox').css('border-bottom', "1px solid #ddd");
}
else {
$('.transBox').css('background-color', "rgba(0,0,0,0.4)");
$('.transBox').css('transition', "background-color 1s");
$('.transBox').css('color', "#ffffff");
$('.transBox').css('border-bottom', "none");
}
});
}
});
</script>
</body>
</html>