-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
36 lines (31 loc) · 858 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
33
34
$('.countfect').each(function () {
var $this = $(this),
countTo = $this.attr('data-num');
delayTo = $this.attr('delay');
if (!delayTo) {
delayTo = 8000
}
$({
countNum: $this.text()
}).animate({
countNum: countTo
}, {
duration: delayTo,
easing: 'linear',
step: function () {
$this.text(Math.floor(this.countNum));
},
complete: function () {
$this.text(this.countNum);
}
});
});
const btnOpen = document.querySelector("#open")
const btnClose = document.querySelector("#close")
const modalContainer = document.querySelector("#modal-container")
btnOpen.addEventListener('click', () => {
modalContainer.classList.add('show')
})
btnClose.addEventListener('click', () => {
modalContainer.classList.remove('show')
})