-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
51 lines (45 loc) · 1.13 KB
/
app.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
$('.slides').slick({
slidesToShow: 5,
arrows: false,
dots:true,
centerMode: true,
centerPadding: 0,
// initialSlide: 2,
infinite: true,
focusOnSelect: true,
responsive: [
{
breakpoint: 1100,
settings: {
arrows: false,
slidesToShow: 3
}
},
{
breakpoint: 640,
settings: {
arrows: false,
slidesToShow: 1
}
}
]
});
// FAQS
$('.question').on('click',function (){
const parent = $(this).parent()
const divItem = parent.parent()
const span = divItem.find('.open-button')
parent.toggleClass('active');
span.toggleClass('active');
});
// typeWriter()
function typeWriter(){
$('.type-effect').each(function (){
$(this).clone().removeClass('type-effect').addClass('clone').appendTo($(this).parent())
let clone = $('.clone')
let initialWidth = clone.width()
clone.remove()
let root = document.documentElement;
root.style.setProperty('--my-end-width', initialWidth + 5 + "px");
})
}