_contest.js
1.86 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
import Swiper, {
Navigation,
Pagination,
A11y,
Keyboard
} from 'swiper';
import 'swiper/css';
import 'swiper/css/navigation';
import 'swiper/css/pagination';
import 'swiper/css/keyboard';
import 'swiper/css/a11y';
jQuery(document).ready(function($) {
$('.carousel-items').each(function() {
var offset = 0,
PerView = 3,
space = 30,
SlidesPerGroup = 1,
offsetAfter = 0,
_id = $(this).attr('id');
var swiper_params = {
modules: [Navigation, Pagination, A11y, Keyboard],
slidesPerView: PerView,
slidesOffsetAfter: offsetAfter,
slidesOffsetBefore: offset,
spaceBetween: space,
slidesPerGroup: SlidesPerGroup ,
pagination: {
el: ".swiper-pagination",
type: 'bullets',
clickable: "true",
},
navigation: {
nextEl: '.swiper-button-next[data-id="' + _id + '"]',
prevEl: '.swiper-button-prev[data-id="' + _id + '"]',
},
a11y: {
prevSlideMessage: 'Previous slide',
nextSlideMessage: 'Next slide',
},
keyboard: {
enabled: true,
onlyInViewport: false,
},
};
new Swiper(this, swiper_params);
});
text_change();
function text_change(){
var words = [ 'Smile',
'Dance',
'Celebrate',
'Hike',
'Laugh',
'Play',
'Explore',
'Discover',
'Climb',
'Parent',
'Adventure',
''];
$.each(words, function( index, value ) {
setTimeout(function(){
$(".like-you strong").text(value);
if( (words.length - 1) == index){
text_change();
}
}, index * 1000 );
});
}
});