c5f2c7a4167db351e8af42da240d9cb2ea965c72
1 window
.addEventListener('load', function() {
2 var links
= document
.getElementById("links").children
[0].children
;
3 var home
= document
.getElementsByClassName("home");
5 for(var i
= 0; i
< links
.length
- 1; i
++) {
6 directions
.push(links
[i
]);
8 for(var i
= 0; i
< home
.length
; i
++) {
9 directions
.push(home
[i
]);
11 var menu
= document
.getElementById("menu");
12 var menuLoc
= parseInt(getComputedStyle(menu
).getPropertyValue("top"));
14 for(var i
= 0; i
< directions
.length
; i
++) {
15 directions
[i
].children
[0].onclick = function(event
) {
16 event
.preventDefault();
17 var node
= event
.currentTarget
;
20 menu
.setAttribute("class", "top");
21 window
.history
.pushState("object or string", "Title", node
.href
);
23 window
.history
.pushState("object or string", "Title", node
.href
);