]> _ Git - pmi.git/commitdiff
wip #2747
authornael <nael@cubedesigners.com>
Tue, 2 Jul 2019 16:22:56 +0000 (18:22 +0200)
committernael <nael@cubedesigners.com>
Tue, 2 Jul 2019 16:22:56 +0000 (18:22 +0200)
public/_modules/home-slider/index.html
public/_modules/home-slider/slider.js

index 1e69e928627def5693f6d266c15c168a0930c51a..a197594ad40a61f54ece72c293c8e550362548ea 100644 (file)
                 </div>
             </div>
         </div>
-
     </div>
 </section>
 
index 9fe4363cd54adcab5ea7812097fd3409a3298cad..04e135a756a0d9e98da9afe1e840009bdec672b2 100644 (file)
@@ -10,18 +10,25 @@ let animationDuration = 0;
 let delayBetweenAnim = 0;
 let mouvement = 0;
 
-    prevBtn.click(function() {
-        nextBtn.prop("disabled", false);
-
-        if (index > 0) {
-            index--;
-            $(".column-wrapper").removeClass("active").eq(index).addClass("active");
-        };
-
-        if (index === 0) {
-            $(this).prop("disabled", true);
-        }
-    });
+prevBtn.click(function() {
+    nextBtn.prop("disabled", false);
+
+    if (index > 0) {
+        index--;
+        // $(".column-wrapper").removeClass("active").eq(index).addClass("active");
+        $(".slide").removeClass("active").eq(index).queue(function(next){
+            $(this).addClass("active");
+            // TweenMax.from($(this),1,{ y: -10});
+            let tl = new TimelineMax();
+            tl.from($('.slide-txt'),1,{ x: -50});
+            next();
+        });
+    };
+
+    if (index === 0) {
+        $(this).prop("disabled", true);
+    }
+});
 
 nextBtn.click(function() {
     setTimeout(function () {