-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.js
More file actions
30 lines (23 loc) · 846 Bytes
/
app.js
File metadata and controls
30 lines (23 loc) · 846 Bytes
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
$(document).ready(() => {
AOS.init();
})
document.addEventListener("scroll", function () {
var st = window.pageYOffset || document.documentElement.scrollTop;
$("nav").css("background-color", "rgba(255,255,255," + (st / 200).toString() + ")")
var offset = 80 - st;
if(offset < 0) {
offset = 0
}
$("#tbnav").css("margin-top", offset.toString() + "px")
}, false)
$('.navbar-nav>li>a').on('click', function () {
$('.navbar-nav').parent().find(".active").removeClass("active");
$(this).parent().addClass("active");
$('.navbar-collapse').collapse('hide');
});
new ResizeObserver(entries =>
console.log('Body height changed:', entries[0].target.clientHeight)
).observe(document.body)
if(window.location.href == "https://ampnet.io/") {
window.location.href = window.location.href + "apx";
}