This repository has been archived by the owner on May 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
navigationEntkoppeln.js
50 lines (43 loc) · 1.99 KB
/
navigationEntkoppeln.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
aktualisiereNavSicht();
TimerNav = setInterval('aktualisiereNavSicht()', 100);
var desktopBreakpoint = 800;
var desktopAnsicht = true;
function aktualisiereNavSicht()
{
pruefeAnsicht()
if(desktopAnsicht == true)
{
if(pruefeObSichtbar() == false)
{
//Navigation ausdocken
document.getElementById('navigationScrollMarke').style.top = '0px';
document.getElementById('navigationScrollMarke').style.position = 'fixed';
document.getElementById('navigationScrollMarke').style.backgroundImage = 'url("Fonts/Bilder/Backgrounds/Transparente/100zu95.png")';
}
else
{
//Navigation (wieder)andocken
document.getElementById('navigationScrollMarke').style.top = '500px';
document.getElementById('navigationScrollMarke').style.position = 'absolute';
document.getElementById('navigationScrollMarke').style.backgroundImage = 'url("Fonts/Bilder/Backgrounds/Transparente/0.png")';
}
}
else
{
//Navigation angedockt lassen
document.getElementById('navigationScrollMarke').style.top = '300px';
document.getElementById('navigationScrollMarke').style.position = 'absolute';
document.getElementById('navigationScrollMarke').style.backgroundImage = 'url("Fonts/Bilder/Backgrounds/Transparente/0.png")';
}
}
function pruefeObSichtbar()
{
if(window.pageYOffset < 450)
{
return true;
}
else
{
return false;
}
}