-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscripts.js
41 lines (40 loc) · 1.11 KB
/
scripts.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).scroll(function() {
var value = $(window).scrollTop()
if (value === 880){
$("#navbar").addClass("navbar-static")
$("#navbar").addClass("navbar-static")
}
$('#navbar').css({
opacity: function() {
console.log((value/1000))
return (value)/1000
}
});
});
$(document).ready(function(){
var width=$(window).width();
if (width<=768){
var autoHeight=$(".second").outerHeight();
if (width<=320){
var adjustedHeight = autoHeight+1100;
$(".second").height(adjustedHeight);
}else if (width>=330&&width<=400){
var adjustedHeight = autoHeight+900;
$(".second").height(adjustedHeight);
}else if (width>=401){
var adjustedHeight = autoHeight+500;
$(".second").height(adjustedHeight);
}
$("li").removeClass("mt-0");
$("li").addClass("mt-2");
}
});
$("#toggler").click(function(){
$("#navbar").css("opacity","1.0");
$("#navbar").css("z-index","10");
});
$(".landing-image").click(function(){
document.querySelector('.second').scrollIntoView({
behavior: 'smooth'
});
});