runningMan: function () {
$(".runningman").empty()
this.quiz.animations.load("RUNNINGMAN_BTN", ".active-screen .runningman", '', true);
+ },
+
+ footer: function(activeScreen) {
+ const $this = this
+ gsap.timeline().to(".active-screen .footer-question", {
+ opacity: 0,
+ duration: 1,
+ delay: .5,
+ ease: 'power4.easeIn',
+ onComplete: function() {
+ $(".active-screen .footer-question").css("z-index",3)
+ }
+ }).to(".active-screen .footer-question", {
+ y: "100%",
+ duration: 0,
+ onComplete: function() {
+ $(activeScreen).find('.btn.continue').removeClass('none')
+ $(activeScreen).find('.btn.validate').addClass('none')
+ // Hide reset button
+ $this.quiz.animations.fadeOut($(activeScreen).find('.btn.reset'), true);
+ }
+ }).to(".active-screen .footer-question", {
+ y: 0,
+ duration: .5,
+ opacity: 1
+ })
}
+
+
}
// Disable form, we don't want the user be able to click on items
$(form).addClass('disabled');
- // Remove validate button and show continue button
- setTimeout(function () {
- $(activeScreen).find('.btn.continue').removeClass('none')
- $(activeScreen).find('.btn.validate').addClass('none');
- }, 10);
-
-
- // Hide reset button
- this.quiz.animations.fadeOut($(activeScreen).find('.btn.reset'), true);
+ this.quiz.animations.footer(activeScreen)
let results = review.answersStatus;
}
$this.activeScreen = screenToShow;
- gsap.timeline().to(screenToShow, {
- autoAlpha: 1
- })
- .to(".active-screen .header-question *", {
- opacity: 1,
- duration: .5
- })
- .to(".active-screen .list-item", {
- opacity: 1,
- ease: "power1.inOut",
- stagger: .15
- }, .7)
- .to(".active-screen .list-item .content", {
- autoAlpha: 1,
- stagger: .1
- }, "<+=.3")
- .to(".active-screen .footer-question", {
- y: 0,
- duration: 1,
- opacity: 1,
- ease: "circ.out",
- onComplete: function () {
- // if countdown enable we launch it
- if($this.quiz.question.current() !== undefined) {
- if (parseInt($this.quiz.question.current().countdown_enable)) {
- $this.countdown()
+ if($(".active-screen").find(".header-question").length > 0) {
+ gsap.timeline().to(screenToShow, {
+ autoAlpha: 1
+ })
+ .to(".active-screen .header-question *", {
+ opacity: 1,
+ duration: .5
+ })
+ .to(".active-screen .list-item", {
+ opacity: 1,
+ ease: "power1.inOut",
+ stagger: .15
+ }, .7)
+ .to(".active-screen .list-item .content", {
+ autoAlpha: 1,
+ stagger: .1
+ }, "<+=.3")
+ .to(".active-screen .footer-question", {
+ y: 0,
+ duration: 1,
+ opacity: 1,
+ ease: "circ.out",
+ onComplete: function () {
+ // if countdown enable we launch it
+ if ($this.quiz.question.current() !== undefined) {
+ if (parseInt($this.quiz.question.current().countdown_enable)) {
+ $this.countdown()
+ }
}
}
- }
- }, 1.4)
+ }, 1.4)
+ }else {
+ gsap.to(screenToShow, {
+ autoAlpha: 1
+ })
+ }
// Reset form to prevent browser letting a option selected after a refresh
$this.resetForm();
clearInterval($this.intervalCountDown)
$this.intervalCountDown = 0;
$this.currentQuestionAnswers = []
+ $(".active-screen .runningman").css("opacity", 0)
/**
*
* provisoire