forked from prefapp/formacion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
executable file
·42 lines (36 loc) · 1.07 KB
/
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
33
34
35
36
37
38
39
40
41
42
$(document).ready(function () {
$(".card")
.delay(1800)
.queue(function (next) {
$(this).removeClass("hover");
$("a.hover").removeClass("hover");
next();
});
});
document.addEventListener("DOMContentLoaded", function (event) {
var dataText = ["docker", "git", "docker-images", "kubernetes", "istio", "helm", "docker-compose", "terraform"];
function typeWriter(text, i, fnCallback) {
if (i < text.length) {
document.querySelector(".typewrite").innerHTML =
text.substring(0, i + 1) + '<span aria-hidden="true"></span>';
setTimeout(function () {
typeWriter(text, i + 1, fnCallback);
}, 100);
} else if (typeof fnCallback == "function") {
setTimeout(fnCallback, 1000);
}
}
function StartTextAnimation(i) {
if (typeof dataText[i] == "undefined") {
setTimeout(function () {
StartTextAnimation(0);
}, 200);
}
if (i < dataText[i].length) {
typeWriter(dataText[i], 0, function () {
StartTextAnimation(i + 1);
});
}
}
StartTextAnimation(0);
});