QuizScreenOutro.prototype = {
initEvents: function () {
const $this = this;
+ let popup = $("#resume")
+
$(document).on("click", ".toggle-answers-review", function () {
$(".score-answers-review_container").toggleClass("active")
});
$(document).on('click', '.btn.restart', function () {
$this.quiz.restart();
});
+ $(document).on("mouseover", ".area-item", function() {
+ let quiz = $("#quiz").get(0)
+ let x = (($(this).offset().left + $(this).width()) - quiz.getBoundingClientRect().x),
+ y = (($(this).offset().top - $(this).height()) - quiz.getBoundingClientRect().y) - $(this).height()
+ let content = $(this).html()
+
+ popup.html(content).css({
+ left: x,
+ top: y,
+ })
+ gsap.to(popup, { autoAlpha: 1 })
+ }).on("mouseout", function() {
+ gsap.to(popup, { autoAlpha: 0 })
+ })
},
animate: function (score, percent) {
.item
padding-left: 20px
- margin-bottom: 22px
+ margin-bottom: 71px
position: relative
*
gap: 8px
height: 100%
+ .area-item:hover
+ transition: all .3s
+ background-color: $neutral-color !important
+ cursor: pointer
+
+ #resume
+ width: 100%
+ max-width: 300px
+ position: absolute
+ opacity: 0
+ background-color: $neutral-color
+ padding: 16px
+ +radius(8px)
+ transform: translate(calc(-100% + -8px), calc(-100% + -14px))
+ z-index: 99
+
.m
.score
height: calc(100vh - 125px)
.simplebar-track
&.simplebar-vertical
right: -8px
+
+ #resume
+ display: none