-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
79 lines (63 loc) · 1.32 KB
/
script.js
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
'use strict';
/* globals $ */
console.log('Hey thanks for checking out my page!');
var page = '#page1';
var renderPage = function(to) {
if (page === to) {
return;
}
$(page).fadeOut(function() {
$(to).fadeIn();
page = to;
});
};
function toggleCollapse() {
}
function toggleMenu() {
$('#menu').text($('#menu').text() === 'Menu' ? 'Close' : 'Menu');
$('.header').toggleClass('expanded');
}
$(document).ready(function() {
$('#name').click(function() {
$('body').addClass('open');
});
$('#collapse').click(function() {
toggleMenu();
toggleCollapse();
});
$('#name').click(function() {
toggleMenu();
renderPage('#page1');
});
$('#flybox').click(function() {
toggleMenu();
renderPage('#page2');
});
$('#enviz').click(function() {
toggleMenu();
renderPage('#page5');
});
$('#ekko').click(function() {
toggleMenu();
renderPage('#page6');
});
$('#braincryption').click(function() {
toggleMenu();
renderPage('#page3');
});
$('#thecouncil').click(function() {
toggleMenu();
renderPage('#page4');
});
$('#thelobby').click(function() {
toggleMenu();
renderPage('#page7');
});
$('#heyyou').click(function() {
toggleMenu();
renderPage('#page5');
});
$('#menu').click(function() {
toggleMenu();
});
});