From d5a335a086358eb7371a3af7a4a625e2d1350039 Mon Sep 17 00:00:00 2001 From: soufiane Date: Fri, 8 Sep 2023 18:32:11 +0200 Subject: [PATCH] wip #6182 @1:30 question drag and drop --- js/quiz.draganddrop.js | 13 +++++++------ views/index.blade.php | 1 - 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/js/quiz.draganddrop.js b/js/quiz.draganddrop.js index ddcde83..c487207 100644 --- a/js/quiz.draganddrop.js +++ b/js/quiz.draganddrop.js @@ -54,7 +54,8 @@ QuizDragAndDrop.prototype = { let zone = $this.getZoneOverlap($this.offsetLeftItemDragged,$this.offsetRightItemDragged), slot = $this.getSlotInformations(zone); - let heightSubject = $(this.target).height() + let target = $(this.target), + heightTarget = $(this.target).height() // gsap.timeline().to(this.target, { @@ -66,16 +67,16 @@ QuizDragAndDrop.prototype = { padding: "7px 8px", borderRadius: "8px", onStart: function() { - $($this.target).addClass("onStart") + target.addClass("onStart") }, - onComplete: function(element) { - let html = $($this.target).html() + onComplete: function() { + let html = target.html() $(zone).find(".slot:not(.active)").eq(0).addClass("active").html(html) - $($this.target).remove() + target.remove() } }) .to(".list .overlay", { - y: -heightSubject, + y: -heightTarget, opacity: 0, onStart: function() { $($this.target).next().addClass("isNext") diff --git a/views/index.blade.php b/views/index.blade.php index 8ae0da4..a25a03d 100644 --- a/views/index.blade.php +++ b/views/index.blade.php @@ -27,7 +27,6 @@
-