Skip to content
Snippets Groups Projects
Commit 144115c7 authored by alexisben's avatar alexisben
Browse files

testimonials wip

parent 158fdca7
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,8 @@ class Carousel {
init () {
var splide = new Splide(this.element).mount(),
toggleButton = splide.root.querySelector('.splide__autoplay'),
stepButtons = splide.root.querySelectorAll('.splide__pagination button');
stepButtons = splide.root.querySelectorAll('.splide__pagination button'),
autoplay = splide.Components.Autoplay;
if (toggleButton) {
stepButtons.forEach((stepButton) => {
......@@ -41,6 +42,13 @@ class Carousel {
splide.on('autoplay:pause', function () {
toggleButton.classList.remove('is-active');
});
// TODO: WIP
// this.element.addEventListener('click', function () {
// if (!autoplay.isPaused()) {
// autoplay.pause();
// }
// });
}
}
}
......
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