PATH:
home
/
letacommog
/
renovation-antibes
/
wp-content
/
plugins
/
elementor-extras
/
assets
/
lib
/
parallax-element
!function(e,t,l,n){e.parallaxElement=function(n,i){var o={speed:.15,speedTablet:.15,speedMobile:.15,scale:.15,scope:e(t),transformItem:null,relative:"middle",disableOn:!1,breakpoints:{mobile:768,tablet:1024}},a=this;a.opts={};var s=null,r=n,p=e(r),c=e(l),d=null,u=e(t).height(),f=(c.height(),null),m=null,h=null,v=null,b=null,T=null,x=null,w=null,E=null,k=-1,S=0,P=!1,M=null;a.init=function(){a.opts=e.extend({},o,i),a._construct()},a._construct=function(){s=a.opts.scope,d=a.opts.speed,S=s.scrollTop(),a.setup(),a.events(),a.requestTick()},a.setup=function(){u=e(t).height(),x=p.height(),w=p.width(),m=p.offset().top,v=m+x,f=s.scrollTop(),T=m+x/2,s.width()<a.opts.breakpoints.tablet&&(d=s.width()<a.opts.breakpoints.mobile?a.opts.speedMobile:a.opts.speedTablet)},a.events=function(){s.on("scroll",a.onScroll),s.on("resize",function(){a.setup(),a.requestTick()})},a.onScroll=function(){S=s.scrollTop(),a.requestTick()},a.requestTick=function(){P||(M=requestAnimationFrame(a.update)),P=!0},a.update=function(){if(P=!1,a.opts.disableOn&&s.width()<a.opts.breakpoints[a.opts.disableOn])return void a.clearProps();if(k!==S){k=S;var l=e(t).height();middleOfScreen=S+l/2,middleToMiddle=middleOfScreen-T,middleToTop=middleOfScreen-m,f=S+l,h=p.offset().top,b=h+x,pxSinceVisible=S-m+l,pPxSinceVisible=S-h+l,pRelative=null,b>S&&h<f&&("middle"===a.opts.relative?pRelative=middleToMiddle:"position"===a.opts.relative&&(pRelative=S),E={y:pRelative*d},a.setProps())}},a.setProps=function(){TweenMax.set(p,E)},a.clearProps=function(){TweenMax.set(p,{clearProps:"all"})},a.destroy=function(){a.clearProps(),cancelAnimationFrame(M),s.off("scroll",a.onScroll),p.removeData("parallaxElement")},a.init()},e.fn.parallaxElement=function(t){return this.each(function(){if(e.fn.parallaxElement.destroy=function(){void 0!==l&&(e(this).data("parallaxElement").destroy(),e(this).removeData("parallaxElement"))},void 0===e(this).data("parallaxElement")){var l=new e.parallaxElement(this,t);e(this).data("parallaxElement",l)}})}}(jQuery,window,document);
[+]
..
[-] parallax-element.min.js
[edit]
[-] parallax-element.js
[edit]