From b7556e640865c97e91572fd6488fc7485f3dd8a9 Mon Sep 17 00:00:00 2001 From: soufiane Date: Mon, 25 Sep 2023 17:25:17 +0200 Subject: [PATCH] wip #6182 @2:00 question match --- js/quiz.match.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/quiz.match.js b/js/quiz.match.js index 93b8679..1c7260e 100644 --- a/js/quiz.match.js +++ b/js/quiz.match.js @@ -35,12 +35,11 @@ QuizMatch.prototype = { this.swiperBottomEl = this.quiz.screens.getActiveScreen().find(".bottom-slider") this.sliderBottomHtml = this.swiperBottomEl.html() - console.log("screen",) - this.swiperTop = new Swiper('.swiper-container.top-slider', { modules: [Navigation, Pagination], slidesPerView: 1, effect: 'fade', + crossFade: true, spaceBetween: 20, mousewheelControl: false, keyboardControl: false, @@ -75,7 +74,11 @@ QuizMatch.prototype = { $this.setRotation(swiper) }, progress: function(swiper) { + console.log(swiper) $this.setRotation(swiper) + }, + update(swiper) { + console.log(swiper) } } }) @@ -113,7 +116,8 @@ QuizMatch.prototype = { let lastIndex = this.swiperTop.slides.length - 1 let index = this.swiperBottom.activeIndex this.quiz.screens.currentQuestionAnswers.push(index) - this.swiperBottom.removeSlide(index) + this.swiperBottomEl.find(".swiper-slide").get(index).remove() + //this.swiperBottom.removeSlide(index) this.swiperBottom.update() if(this.swiperTop.activeIndex === lastIndex) { -- 2.39.5