BossBey File Manager
PHP:
8.2.30
OS:
Linux
User:
imagivibe
Root
/
home
/
imagivibe
/
www
/
CTR
/
wp-content
/
plugins
/
porto-functionality
/
shortcodes
/
assets
/
js
📤 Upload
📝 New File
📁 New Folder
Close
Editing: porto-scroll-parallax.min.js
(function(t){var s="__scroll_parallax",i=function(t,s){return this.initialize(t,s)};i.defaults={minWidth:991,transitionDuration:"200ms",cssProperty:"width",cssValueStart:40,cssValueEnd:100,cssValueUnit:"vw"},i.prototype={initialize:function(t,i){return t.data(s)||(this.$el=t,this.onScroll=this.onScroll.bind(this),this.setData().setOptions(i).build()),this},setData:function(){return this.$el.data(s,this),this},disable:function(){var t={overflow:"",width:""};"vw"==this.options.cssValueUnit?(t.position="",t.left=""):"%"==this.options.cssValueUnit&&(t.marginLeft="",t.marginRight=""),this.$el.css(t),window.removeEventListener("scroll",this.onScroll)},setOptions:function(s){return this.options=t.extend(!0,{},i.defaults,s,{wrapper:this.$el}),this},onScroll:function(s){var i=this;if(i.$el.visible(!0)){var o=t(window).scrollTop(),e=i.$el.offset().top,n=i.$el.outerHeight(),r=window.innerHeight,l=100,a=window.theme&&theme.StickyHeader.sticky_height||0,p=1;1.2*n<r&&(p=1.2),o+r<=e+n*p?l=(o+r-e)/n/p*100:!i.started&&o+a>=e&&(l=o+a>=e+n?0:100-(o-e+a)/n*100),l>=98&&(i.started=!0);var c=i.options.cssValueUnit?i.options.cssValueUnit:"";if(i.progress=i.options.cssValueStart+(i.options.cssValueEnd-i.options.cssValueStart)*(l/100),i.prevProgress&&i.prevProgress===i.progress)return;i.progress>=i.options.cssValueEnd&&(i.progress=i.options.cssValueEnd),i.progress<i.options.cssValueStart&&(i.progress=i.options.cssValueStart),i.prevProgress=i.progress;var u={};u[i.options.cssProperty]=i.progress+c,"width"==i.options.cssProperty&&(i.progress>=i.options.cssValueEnd?(u.overflow="",u.width="","vw"==i.options.cssValueUnit?(u.position="",u.left=""):"%"==i.options.cssValueUnit&&(u.marginLeft="",u.marginRight="")):(u.overflow="hidden","vw"==i.options.cssValueUnit?(u.position="relative",u.left="calc( "+(100-i.progress)/2+c+" - "+i.scrollbarWidth/2+"px )"):"%"==i.options.cssValueUnit&&(i.$el[0].style.setProperty("margin-left","auto","important"),i.$el[0].style.setProperty("margin-right","auto","important")))),i.$el.css(u)}},build:function(){var s=this;t(window);if(!(window.innerWidth>s.options.minWidth))return this;var i=s.$el;if(i.length){var o=t(window).scrollTop()>s.$el.offset().top+t(window).outerHeight()?s.options.cssValueEnd:s.options.cssValueStart,e=s.options.cssValueUnit?s.options.cssValueUnit:"",n=theme&&theme.getScrollbarWidth&&theme.getScrollbarWidth();n||(n=0),s.scrollbarWidth=n,s.progress=o,i.css({transition:"ease "+s.options.cssProperty+" "+s.options.transitionDuration+", left "+s.options.transitionDuration,width:o+e}),"width"==s.options.cssProperty&&("vw"==s.options.cssValueUnit?i.css({position:"relative",left:"calc( "+(100-o)/2+e+" - "+n/2+"px )"}):"%"==s.options.cssValueUnit&&(i[0].style.setProperty("margin-left","auto","important"),i[0].style.setProperty("margin-right","auto","important"))),window.addEventListener("scroll",s.onScroll),s.onScroll()}}},t.fn.themeScrollParallax=function(o){return this.map((function(){var e=t(this);return e.data(s)?e.data(s):new i(e,o)}))},t('[data-plugin="scroll-parallax"]').filter((function(){return!t(this).find(".owl-carousel").length})).each((function(){var s=t(this),i=s.data("sp-options");s.themeScrollParallax(i)})),t(".owl-carousel").filter((function(){return!!t(this).closest('[data-plugin="scroll-parallax"]').length})).on("initialized.owl.carousel",(function(){var s=t(this).closest('[data-plugin="scroll-parallax"]'),i=s.data("sp-options");window.theme&&theme.dynIntObsInit?theme.dynIntObsInit(s,"themeScrollParallax",i):s.themeScrollParallax(i)}))}).apply(this,[jQuery]);
Save
Cancel