-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjQuery.js
More file actions
33 lines (31 loc) · 1.22 KB
/
jQuery.js
File metadata and controls
33 lines (31 loc) · 1.22 KB
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
$(document).ready(function(){
//when navbar is hovered over, move highlight to hovered button!
$("#nav1").hover(function(){
$(".highlight").attr("style","margin-left:0px;");
//$(".highlightB").attr("style","margin-left:0px;");
});
$("#nav2").hover(function(){
$(".highlight").attr("style","margin-left:25%;");
//$(".highlightB").attr("style","margin-left:33.3%;");
});
$("#nav3").hover(function(){
$(".highlight").attr("style","margin-left:50%;");
//$(".highlightB").attr("style","margin-left:66.6%;");
});
$("#nav4").hover(function(){
$(".highlight").attr("style","margin-left:75%;");
//$(".highlightB").attr("style","margin-left:66.6%;");
});
let ContentHeight = $(".content").height();
console.log(ContentHeight);
let PageHeight = window.innerHeight;
console.log(PageHeight);
if(ContentHeight>=PageHeight/2.5){
$(".footer").attr("style","width:100%;margin-top:50px;background-color: #1E1B18;color: #f2f2f2;text-align: center;position: relative;bottom:auto;");
console.log("haw");
}
else {
$(".footer").attr("style","width:100%;margin-top:50px;background-color: #1E1B18;color: #f2f2f2;text-align: center;position: absolute;bottom:0px;");
console.log("ye");
}
})