-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
120 lines (94 loc) · 2.47 KB
/
script.js
File metadata and controls
120 lines (94 loc) · 2.47 KB
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
$( document ).ready(function() {
"use strict";
$('body').removeClass('fade-out');
/* Drop down menu
-------------------------------------------------------*/
var menu = $('.sliding-menu').sliiide({
place: 'top',
toggle: '#sliiider-toggle',
exit_selector: ".slider-exit",
animation_duration: "0.9s",
animation_curve: "cubic-bezier(0.23, 1, 0.32, 1)",
body_slide: false,
no_scroll: true,
auto_close: true
});
menu.activate();
menu.deactivate();
/* Swiper Slides 1
-------------------------------------------------------*/
var mySwiper = new Swiper ('.rfa-slide-container--chapter-select', {
direction: 'horizontal',
keyboardControl: true,
paginationType: 'bullets',
pagination: '.swiper-pagination',
paginationClickable: true,
breakpoints: {
320: {
slidesPerView: 1,
spaceBetween: 0,
centeredSlides: false,
},
414: {
slidesPerView: 1,
spaceBetween: 0,
centeredSlides: false,
},
1024: {
//slidesPerView: 2.2,
slidesPerView: 'auto',
spaceBetween: 50,
centeredSlides: true,
},
2560: {
//slidesPerView: 2.2,
slidesPerView: 'auto',
spaceBetween: 50,
centeredSlides: true,
}
},
mousewheelControl: true,
spaceBetween: 0,
hashnav: true,
hashnavWatchState: true,
'onInit': function(){
console.log('Hey Guys');
}
});
/* Swiper Slides 2
-------------------------------------------------------*/
var mySwiperTwo = new Swiper ('.rfa-slide-container--chapter', {
slidesPerView: 1,
direction: 'horizontal',
keyboardControl: true,
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
mousewheelControl: true,
spaceBetween: 0,
hashnav: true,
hashnavWatchState: true,
});
/* Swiper Two-way Nav Control
-------------------------------------------------------*/
var slideLinks = new Swiper( '.slide-links-container', {
direction: 'horizontal',
spaceBetween: 0,
centeredSlides: true,
slidesPerView: 1,
effect: 'fade',
fade: { crossFade: true }
});
mySwiperTwo.params.control = slideLinks;
slideLinks.params.control = mySwiperTwo;
mySwiper.on('onSlideChangeStart', function () {
if (mySwiper.activeIndex > 0) {
$('#rfaPagePagination')
.removeClass('hide-swiper-pagination')
.addClass('add-swiper-pagination');
}else {
$('#rfaPagePagination')
.addClass('hide-swiper-pagination')
.removeClass('add-swiper-pagination');
}
});
});