-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
62 lines (50 loc) · 1.5 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
'use strict';
(function() {
// invocation
//preloader();
burgerCloseIcon();
//change burger close icon
function burgerCloseIcon() {
let btn = document.querySelector(".navbar-toggler");
let icon = document.querySelector(".navbar-toggler-icon");
btn.addEventListener("click", function() {
icon.classList.toggle('close-img');
});
}
//////preloader
function preloader() {
document.body.onload = function() {
setTimeout(function() {
var preloader = document.querySelector(".preloader");
if (!preloader.classList.contains('done')) {
preloader.classList.add('done');
}
}, 1000)
}
};
//show text in example of portfolio
function showTitle() {
let tl = new TimelineMax();
tl
.from(".navbar-brand", .5, {
x: '-300%',
}, delay = .5)
.staggerFrom(".nav-link", .5, {
y: '-50',
opacity: 0
}, 0.1, "-=0.20")
.from('#title', 2, {
y: '-300%',
ease: Bounce.easeOut
})
.from('.hero__subtitle', .5, {
y: '100',
opacity: 0
}, "-=1")
.from('.hero__toscroll', 1, {
backgroundColor: "rgba(52, 58, 64)",
opacity: .8,
borderRadius: "5px"
}, "-=2")
}
})();