%PDF- %PDF-
Direktori : /home/eirtvhdf/logobrainiac.com/logodesign/js/ |
Current File : /home/eirtvhdf/logobrainiac.com/logodesign/js/custom-slider.min.js |
$(function () { let controller = new ScrollMagic.Controller(); var $window = $(window); let rest; new ScrollMagic.Scene({ triggerElement: "#trigger1", triggerHook: 0.8, offset: 50 }).setClassToggle("#reveal1", "visible").addTo(controller); new ScrollMagic.Scene({ triggerElement: "#trigger12", triggerHook: 0.8, offset: 50 }).setClassToggle("#reveal12", "visible").addTo(controller); if ($window.width() < 992 && $window.width() >= 768) { position = new TimelineMax().to("#js-slideContainer", 1, { x: "-400%" }, { y: "0%" }); rest = new ScrollMagic.Scene({ triggerElement: "#js-wrapper", triggerHook: 0, duration: "310%" }).setPin("#js-wrapper").setTween(position); rest.refresh(); controller.addScene(rest) } else if ($window.width() < 768) { position = new TimelineMax().to("#js-slideContainer", 1, { x: "-570%" }, { y: "0%" }); rest = new ScrollMagic.Scene({ triggerElement: "#js-wrapper", triggerHook: 0, duration: "310%" }).setPin("#js-wrapper").setTween(position); rest.refresh(); controller.addScene(rest) } else { position = new TimelineMax().to("#js-slideContainer", 1, { x: "-255%" }) rest = new ScrollMagic.Scene({ triggerElement: "#js-wrapper", triggerHook: 0, duration: "310%" }).setPin("#js-wrapper").setTween(position); rest.refresh(); controller.addScene(rest) } $(window).resize(function () { rest.destroy(!0); let position; if ($window.width() < 992 && $window.width() >= 768) { position = new TimelineMax().to("#js-slideContainer", 1, { x: "-400%" }, { y: "0%" }); rest = new ScrollMagic.Scene({ triggerElement: "#js-wrapper", triggerHook: 0, duration: "310%" }).setPin("#js-wrapper").setTween(position); rest.refresh(); controller.addScene(rest) } else if ($window.width() < 768) { position = new TimelineMax().to("#js-slideContainer", 1, { x: "-570%" }, { y: "0%" }); rest = new ScrollMagic.Scene({ triggerElement: "#js-wrapper", triggerHook: 0, duration: "310%" }).setPin("#js-wrapper").setTween(position); rest.refresh(); controller.addScene(rest) } else { position = new TimelineMax().to("#js-slideContainer", 1, { x: "-255%" }); rest = new ScrollMagic.Scene({ triggerElement: "#js-wrapper", triggerHook: 0, duration: "310%" }).setPin("#js-wrapper").setTween(position); rest.refresh(); controller.addScene(rest) } }) })