javascript - scrollmagic triggerHook -


heres deal. im trying use scrollmagic animate car using gsap once comes view. problem doing page loads not when item comes view, im not sure whats going on. went pretty drastic offset value , nothing (btw, im not programmer forgive ignorance).

$(document).ready(function($) { var vehicle = $("#vehicle"), vehicle2 = $("#vehicle2");   // controller var controller = new scrollmagic.controller();  // 2. car timeline var tl = new timelinemax() tl.from(vehicle, 5, {right: "20",top: "0", opacity:1}) .to(vehicle, 0.3, {opacity:0});  // 2. car scene var scene = new scrollmagic.scene({triggerelement: "#trigger1", triggerhook:0, offset: 1000})  .settween(tl) .addto(controller);  }); 

here's link codepen: enter link description here


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -