//script JS
$(document).ready(function() {
var fadeinTween = TweenMax.to('.fadein > div', .400,{ opacity: 1 });
var fadeoutTween = TweenMax.to('.fadein > div', .400,{ opacity: 0 });
var controller = new ScrollMagic.Controller();
var fadeinScene = new ScrollMagic.Scene({
triggerElement: '.fadein',
reverse: false
})
.setTween(fadeinTween)
.addTo(controller);
var fadeoutScene = new ScrollMagic.Scene({
triggerElement: '.fadeout',
reverse: true
})
.setTween(fadeoutTween)
.addTo(controller);
});
Require: jquery.min.js / TweenMax.min.js / ScrollMagic.min.js / animation.gsap.min.js ---- Send mail or comment for more infos.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.