Requirement: As the scene is triggered "start" event is triggered which calls scenestart function and works perfectly on desktop/mac on chrome and safari. But this event is totally unreliable on mobile devices. it gets triggered sometimes once while scrolling in one direction. if you go in opposite direction it doesn't trigger.
for (var i = 0; i < $rootScope.flow.modules.length; i++) {
var el = document.getElementById("page-" + i);
var scene = new ScrollMagic.Scene({
triggerElement: el, //"#page-" + i,
triggerHook: 0.5,
});
scene.on("start", sceneStart); //this event triggering
//is inconsistent and
//fires random on mobile
//devices on
ctl.addScene(scene);
}
Requirement: As the scene is triggered "start" event is triggered which calls scenestart function and works perfectly on desktop/mac on chrome and safari. But this event is totally unreliable on mobile devices. it gets triggered sometimes once while scrolling in one direction. if you go in opposite direction it doesn't trigger.
for (var i = 0; i < $rootScope.flow.modules.length; i++) { var el = document.getElementById("page-" + i); var scene = new ScrollMagic.Scene({ triggerElement: el, //"#page-" + i, triggerHook: 0.5, });
I tried looking at http://scrollmagic.io/examples/expert/mobile_advanced.html but I couldn't figure out how will the sourcecode help me in triggering similar event? I went through custom events (http://iscrolljs.com/#custom-events) in Iscroll but couldn't figure-out how will that trigger event based on different elements shown in viewport.
Any help appreciated. Thanks!