-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
61 lines (53 loc) · 1.43 KB
/
Copy pathindex.js
File metadata and controls
61 lines (53 loc) · 1.43 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
$(function() {
// Scrollify options
$.scrollify({
section : ".divider",
sectionName : "section-name",
interstitialSection : ".footer",
easing: "easeOutExpo",
scrollSpeed: 1100,
offset : 0,
scrollbars: true,
setHeights: false,
overflowScroll: true,
updateHash: true,
touchScroll: true,
});
$('#link-1').click((e) => {
e.preventDefault();
$.scrollify.move("#home");
});
$('#link-2').click((e) => {
e.preventDefault();
$.scrollify.move("#about");
});
$('#link-3').click((e) => {
e.preventDefault();
$.scrollify.move("#projects");
});
$('.link-4').click((e) => {
e.preventDefault();
$.scrollify.move("#contact");
});
$('.arrow').click((e) => {
e.preventDefault();
$.scrollify.move("#about");
})
// Typed.js options
const typed = new Typed('#typing-prompt', {
strings: ["", "full-stack developer ^1000", "lifelong learner ^1000", "UI|UX enthusiast ^1000", "health specialist ^1000", "sports fanatic ^1000", "adventure seeker"],
typeSpeed: 60,
smartBackspace: true,
loop: true,
});
// scroll navigation
let scrollTop = 0;
$(window).scroll(function(){
scrollTop = $(window).scrollTop();
if (scrollTop >= 100) {
$('#top-nav').addClass('scrolled-nav');
} else if (scrollTop < 100) {
$('#top-nav').removeClass('scrolled-nav');
}
});
});