-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspb-scripts.js
154 lines (140 loc) · 3.87 KB
/
spb-scripts.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
var swiper = new Swiper('.swiper-slider .swiper-plays-slider', {
// Default parameters
slidesPerView: 1,
spaceBetween: 0,
// Responsive breakpoints
breakpoints: {
// when window width is >= 480px
600: {
slidesPerView: 2,
spaceBetween: 0,
},
// when window width is >= 640px
960: {
slidesPerView: 3,
spaceBetween: 0,
},
},
// Navigation
navigation: {
nextEl: ".swiper-slider .swiper-button-next.plays",
prevEl: ".swiper-slider .swiper-button-prev.plays",
},
});
var swiper = new Swiper('.swiper-slider .swiper-advanced-plays-slider', {
// Default parameters
slidesPerView: 1,
spaceBetween: 0,
// Responsive breakpoints
breakpoints: {
// when window width is >= 480px
600: {
slidesPerView: 2,
spaceBetween: 0,
},
// when window width is >= 640px
960: {
slidesPerView: 3,
spaceBetween: 0,
},
},
// Navigation
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
});
var swiper = new Swiper('.swiper-story-slider', {
// Default parameters
slidesPerView: 1,
spaceBetween: 0,
loop: true,
loopedSlides: 6,
speed: 400,
autoplay: {
delay: 2500,
pauseOnMouseEnter: true,
disableOnInteraction: false,
disableOnInteraction: false,
},
});
var swiper = new Swiper('.swiper-challenges-slider', {
// Default parameters
slidesPerView: 1,
spaceBetween: 0,
// Responsive breakpoints
breakpoints: {
// when window width is >= 480px
660: {
slidesPerView: 2,
spaceBetween: 0,
},
// when window width is >= 640px
960: {
slidesPerView: 3,
spaceBetween: 0,
},
},
// Navigation
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
});
var swiper = new Swiper('.swiper-partner-slider', {
// Default parameters
spaceBetween: 0,
centeredSlides: true,
speed: 4000,
autoplay: {
delay: 0,
},
loop: true,
loopedSlides: 4,
slidesPerView:'auto',
allowTouchMove: false,
disableOnInteraction: true,
// Responsive breakpoints
breakpoints: {
// when window width is >= 480px
660: {
speed: 3000,
},
},
});
// Piano Plays Slider Play Card Facts
var swiper = new Swiper('.swiper-piano-plays-slider', {
// Default parameters
spaceBetween: 0,
speed: 30000,
autoplay: {
delay: 0,
},
loop: true,
loopedSlides: 6,
slidesPerView:'auto',
allowTouchMove: false,
disableOnInteraction: true,
});
// Replace Play Card Facts
var Webflow = Webflow || [];
Webflow.push(function() {
$('.swiper-plays-slider .facts-group').each(function (groupIndex, group) {
$(group).find('.facts-resort').each(function (resortIndex, resort) {
var unorderedListItems = $(resort).find('.unordered-list-item')
var checkListItems = $(resort).find('.check-list-item')
var unorderedList = $(group).find('.fact-group .unordered-list');
var checkList = $(group).find('.fact-group .check-list');
$(unorderedListItems).appendTo(unorderedList);
$(checkListItems).appendTo(checkList);
if (resortIndex + 1 === $(group).find('.facts-resort').length) {
$(group).find('.w-dyn-list').remove();
}
});
});
$('.swiper-plays-slider [data-replace-card="advanced"]').each(function (cardIndex, card) {
var parentSlide = $(card).closest('.swiper-slide');
var advancedSlides = $('.swiper-advanced-plays-slider [data-insert-card="advanced"]');
$(advancedSlides).append(parentSlide);
});
});