Skip to content
Snippets Groups Projects
Commit 7c7acd0d authored by alexisben's avatar alexisben
Browse files

fix testimonial pagination #63

parent b7e4d849
No related branches found
No related tags found
No related merge requests found
......@@ -33,39 +33,39 @@ class Carousel {
stepButton.innerHTML = '<i></i>';
});
this.splide.on('autoplay:play', function () {
this.splide.on('autoplay:play', () => {
toggleButton.classList.add('is-active');
});
this.splide.on('autoplay:playing', function (rate) {
this.splide.on('autoplay:playing', (rate) => {
var activeStepButton = this.splide.root.querySelector('.splide__pagination .is-active i');
activeStepButton.style.width = rate * 100 + '%';
});
this.splide.on('autoplay:pause', function () {
this.splide.on('autoplay:pause', () => {
toggleButton.classList.remove('is-active');
});
elements.forEach(function(element) {
elements.forEach(element => {
element.addEventListener('click', () => {
autoplay.pause();
})
});
this.splide.on('drag', function() {
this.splide.on('drag', () => {
autoplay.pause();
});
}
}
listen() {
this.splide.on('move', function() {
this.splide.on('move', () => {
this.splide.root.classList.add('is-moving')
}.bind(this));
});
this.splide.on('moved', function() {
this.splide.on('moved', () => {
this.splide.root.classList.remove('is-moving')
}.bind(this));
});
}
}
......
......@@ -57,6 +57,10 @@
width: 42px
&::before
color: $color-accent
&:not(.is-active)
+ .splide__pagination
.is-active i
width: 100% !important
.splide__play
&::before
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment