/*(function ($, root, undefined) { $(function () { let windowWidth = $(window).width(); //if(windowWidth > 960) { 'use strict'; // DOM ready, take it away gsap.registerPlugin('ScrollTrigger'); gsap.config({ nullTargetWarn: false, }); let panels = gsap.utils.toArray(".screen") panels.forEach((panel, i) => { ScrollTrigger.create({ trigger: panel, start: "top top", scrub:1, pin: i === panels.length -1 ? false : true, //end:"bottom 100", pinSpacing: false , anticipatePin: 0.5, pinType: 'fixed' }); }); let titles = gsap.utils.toArray(".screen .title"); titles.forEach((title,i)=> { gsap.from(title, { scrollTrigger: { trigger:title, start:"top bottom", end: "=50%", toggleActions: "restart pause reverse pause", scrub:2, }, yPercent:30, duration:1 }); }); /* gsap.to("#home-content .screen", { scrollTrigger: { trigger: ".screen", pin: true, // pin the trigger element while active pinSpacing: "false", start: "top top", // when the top of the trigger hits the top of the viewport end: "bottom 150px", // end after scrolling 500px beyond the start markers: true, } }); */ function sectionAnimation(section){ let imageBackground = $(section).find('.image-background'); imageBackground.fadeIn(); } // page section images /* gsap.utils.toArray('#home-content .screen').forEach((section, i) => { gsap.to(section, { scrollTrigger: { trigger: $('body'), onRefresh: self => self.progress === 1 && self.animation.progress(1), // markers:true, onEnter: () => sectionAnimation(section), onEnterBack: () => sectionAnimation(section) }, }); });*//* //} $(document).on('click', '.seemore', function(event){ event.preventDefault(); var viewportHeight = $(window).height(); $('html, body').animate({ scrollTop: $(window).scrollTop() + viewportHeight, complete: function () { //Hide your button here } }, 1000); }); }); })(jQuery, this); */ /* (function($) { function visible(element) { return $.expr.filters.visible(element) && !$(element).parents().addBack().filter(function() { return $.css(this, 'visibility') === 'hidden'; }).length; } function focusable(element, isTabIndexNotNaN) { var map, mapName, img, nodeName = element.nodeName.toLowerCase(); if ('area' === nodeName) { map = element.parentNode; mapName = map.name; if (!element.href || !mapName || map.nodeName.toLowerCase() !== 'map') { return false; } img = $('img[usemap=#' + mapName + ']')[0]; return !!img && visible(img); } return (/input|select|textarea|button|object/.test(nodeName) ? !element.disabled : 'a' === nodeName ? element.href || isTabIndexNotNaN : isTabIndexNotNaN) && // the element and all of its ancestors must be visible visible(element); } $.extend($.expr[':'], { focusable: function(element) { return focusable(element, !isNaN($.attr(element, 'tabindex'))); } }); })(jQuery); */ /*******************************************************************/ /* ftrtch dino */ /* [type: JS] [file:template-home] [1.1329] DESIGN*/ /*******************************************************************/ /* 0.8 D>D */ /* db 159 */