-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
43 lines (34 loc) · 999 Bytes
/
index.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
window.addEventListener('scroll', function() {
var header = document.querySelector('header');
if (window.scrollY > 0) {
header.classList.add('small-header');
} else {
header.classList.remove('small-header');
}
});
function toggleDescription() {
var moreText = document.getElementById("more-text");
var btnText = document.getElementById("view-more-btn");
if (moreText.style.display === "none") {
moreText.style.display = "inline";
btnText.innerHTML = "View Less ▲";
} else {
moreText.style.display = "none";
btnText.innerHTML = "View More ▼";
}
}
function initMap() {
var noroffOslo = {
lat: 59.9126,
lng: 10.7496
};
var map = new google.maps.Map(
document.getElementById('map'), {
zoom: 15,
center: noroffOslo
});
var marker = new google.maps.Marker({
position: noroffOslo,
map: map
});
}