2

Is it possible to animate elements using Scrollmagic plugin without scrollbar enabled. I have given 100vh height for my container so there will be no scrollbar. Can you anyone help me to find a solution for that? I have given my code below.

$(document).ready(function () {

// wait until window is loaded (images, links etc...)
window.onload = function () {
  // Init ScrollMagic Controller
  var controller = new ScrollMagic.Controller();

  var tl_boat = new TimelineMax();

  // Create Animation for 0.5s
  var tween = tl_boat.staggerFrom('.in-ship', 1, {
    opacity: 0,
    x: -100,
  },0.5);

  // Create the Scene and trigger when visible
  var scene = new ScrollMagic.Scene({
      triggerElement: 'body',
      duration: 500,
      offset: 0,
      triggerHook: "onLeave",
      reverse: true,
    })
    .addTo(controller)
    .setTween(tween)
    .addIndicators(controller);
};

});

sonu sasankan
  • 79
  • 1
  • 2
  • 10

0 Answers0