-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
32 lines (31 loc) · 836 Bytes
/
script.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
$(function () {
var roles = ["Code Enthusiast","Web Developer", "Student", "VITian"];
var count = 0;
var $typeSpan = $("#intro .content h2 span").typist({
text: roles[count]
});
setInterval(() => {
$typeSpan
.typistRemove(roles[count++ % roles.length].length)
.typistPause(2000)
.typistAdd(roles[count % roles.length]);
}, 5000);
$(".navbar").hide();
$(window).scroll(function () {
if ($(window).scrollTop() > 40) {
$(".navbar").slideDown(100);
} else {
$(".navbar").slideUp(100);
}
});
$(".go-down a").click(function (e) {
e.preventDefault();
var top = $($(this).attr("href")).position().top - 70;
$("html, body").animate(
{
scrollTop: top
},
1000
);
});
});