-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.js
More file actions
65 lines (54 loc) · 1.42 KB
/
code.js
File metadata and controls
65 lines (54 loc) · 1.42 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
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
/* var followCursor = (function() {
var s = document.createElement('div');
s.style.position = 'absolute';
s.style.margin = '0';
s.style.padding = '5px';
s.textContent = "♪"
return {
init: function() {
document.body.appendChild(s);
},
run: function(e) {
var e = e || window.event;
s.style.left = (e.clientX - 5) + 'px';
s.style.top = (e.clientY - 5) + 'px';
getMouseCoords(e);
}
};
}());
window.onload = function() {
followCursor.init();
document.body.onmousemove = followCursor.run;
}
*/
function contactScroll() {
window.scrollTo(0, 1000);
}
function homeScroll() {
window.scrollTo(0,0);
}
function aboutScroll() {
window.scrollTo(0, 500);
}
function openModal() {
document.querySelector('#background-modal').style.display = 'flex';
}
function closeModal() {
document.querySelector('#background-modal').style.display = 'none';
}
function ifOther() {
if (document.getElementById('where-heard-from-input').value == 'other') {
document.querySelector('#if-other').style.display = 'flex';
}
else {
document.querySelector('#if-other').style.display = 'none';
}
}
let emailList = [];
let nameList = [];
function collectEmail() {
emailList.push(document.getElementById('email').value);
nameList.push(document.getElementById('name-input-input').value);
}
console.log(emailList);
console.log(nameList);