南宫28
$(document).ready(function() {
// animation
var anim = $('.animation');
if (anim != null){
if (animatonViewport(anim[0])) {
anim[0].classList.add("in-viewport");
}
window.addEventListener('scroll', function (event) {
for (var i = 0; i < anim.length; i++) {
if (animatonViewport(anim[i])) {
anim[i].querySelectorAll(".img").forEach(el => el.classList.remove("progressive-img"));
anim[i].classList.add("in-viewport");
}
}
// trigger banner autoplay
if (animatonViewport(anim[2])) {
$("#campaign-banner").trigger('play.owl.autoplay',[5000])
}
}, false);
}
});南宫28