0
工作在所有的瀏覽器,但不包括IE11,這個工程的jQuery滾動時的觸發因素一類新running
添加元素與類paused
。ScrollMagic不是在IE11
觸發元素設置在div上。和Firefox一樣,Safari和Chrome也增加了這個類。但它IE11,它似乎並沒有吸引觸發器。
這可能是IE11和jQuery .ready的問題嗎?
$(document).ready(function() {
var scene1 = new ScrollMagic.Scene({triggerElement: "#trigger1"})
.setClassToggle(".svg1 .paused", "running")
.addTo(controller);
var scene3 = new ScrollMagic.Scene({triggerElement: "#trigger3"})
.setClassToggle(".svg3 .paused", "running")
.addTo(controller);
});
$(document).ready(function() {
if ($(window).width() <= 991) {
var scene2 = new ScrollMagic.Scene({triggerElement: "#trigger5"})
.setClassToggle(".svg2 .paused", "running")
.addTo(controller);
var scene4 = new ScrollMagic.Scene({triggerElement: "#trigger6"})
.setClassToggle(".svg4 .paused", "running")
.addTo(controller);
}
});
$(document).ready(function() {
if ($(window).width() >= 992) {
var scene2 = new ScrollMagic.Scene({triggerElement: "#trigger2"})
.setClassToggle(".svg2 .paused", "running")
.addTo(controller);
var scene4 = new ScrollMagic.Scene({triggerElement: "#trigger4"})
.setClassToggle(".svg4 .paused", "running")
.addTo(controller);
}
});