// Load the animation "name" in container
load: function (name, container, replace, loop = false, fit = 'default') {
+ if (replace === undefined) {
+ replace = [];
+ }
let json = this.quiz.data.animations[name];
let renderSettings = {};
if (fit === 'cover') {
}, .7)
},
- globalAnimations:function(){
- gsap.fromTo('#credits',{y:50} ,{y:0,duration:.5},0.35);
+ globalAnimations: function () {
+ gsap.fromTo('#credits', {y: 50}, {y: 0, duration: .5}, 0.35);
}
}
updateBackgrounds: function () {
let $this = this;
$('[data-bg]').each(function () {
+ if (!$this.quiz.utils.isVisible(this)) {
+ return;
+ }
var v = $this.isMobile() ? $(this).attr('data-bg-m') : $(this).attr('data-bg-d');
if (v === undefined || v === null) {
v = $(this).attr('data-bg-d');