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: float-element.min.js
(function(t,o){"use strict";t=t||{};var n="__floatElement",e=function(t,o){return this.initialize(t,o)};e.defaults={startPos:"top",speed:3,horizontal:!1,circle:!1,transition:!1,transitionDelay:0,transitionDuration:500},e.prototype={initialize:function(t,o){return t.data(n)||(this.$el=t,this.setData().setOptions(o).build()),this},setData:function(){return this.$el.data(n,this),this},setOptions:function(t){return this.options=o.extend(!0,{},e.defaults,t,{wrapper:this.$el}),this},build:function(){var e,i=this,s=this.options.wrapper,a=o(window);if(i.options.style&&s.attr("style",i.options.style),i.options.circle){i.options.transition&&s.css({transition:"ease-out transform "+i.options.transitionDuration+"ms "+i.options.transitionDelay+"ms"});var r=function(){i.movement(e)};window.addEventListener("scroll",r,{passive:!0}),i.$el.on("float_destroy",(function(){window.removeEventListener("scroll",r,{passive:!0}),i.$el.css("transform",""),i.$el.css("transition",""),i.$el.removeData(n)}))}else if(a.width()>767){"none"==i.options.startPos?e="":"top"==i.options.startPos?(s.css({top:0}),e=""):(s.css({bottom:0}),e="-"),i.options.transition&&s.css({transition:"ease-out transform "+i.options.transitionDuration+"ms "+i.options.transitionDelay+"ms"}),i.$el.hasClass("marquee")||i.movement(e);r=function(){i.movement(e)};var l=function(t){i.movement(e,t.scroll.y)};window.addEventListener("scroll",r,{passive:!0}),t.locomotiveScroll&&t.locomotiveScroll.on("scroll",l),i.$el.on("float_destroy",(function(){window.removeEventListener("scroll",r,{passive:!0}),i.$el.css("transform",""),i.$el.css("transition",""),i.$el.css("top",""),i.$el.css("bottom",""),i.$el.removeData(n),t.locomotiveScroll&&t.locomotiveScroll.off("scroll",l)}))}return this},movement:function(t,n=!1){var e=this,i=this.options.wrapper,s=o(window),a=!1===n?s.scrollTop():n,r=i.offset().top,l=r-a;if(!1!==n&&(r=(l=i.offset().top)+a),e.options.circle)i.css({transform:"rotate("+.25*a+"deg)"});else{var c=100*l/s.height();r+i.height()>=a&&r<=a+window.innerHeight&&(e.options.horizontal?i.css({transform:"translate3d("+t+c/e.options.speed+"%, 0, 0)"}):i.css({transform:"translate3d(0, "+t+c/e.options.speed+"%, 0)"}))}}},o.extend(t,{PluginFloatElement:e}),o.fn.themePluginFloatElement=function(t){return this.map((function(){var i=o(this);return i.data(n)?i.data(n):new e(i,t)}))}}).apply(this,[window.theme,jQuery]),function(t,o){o.isReady&&t.fn.themePluginFloatElement&&t((function(){t("[data-plugin-float-element]:not(.manual)").each((function(){var n,e=t(this),i=o.getOptions(e.data("plugin-options"));i&&(n=i),e.themePluginFloatElement(n)}))})),t(document.body).on("porto_init",(function(n,e){t.fn.themePluginFloatElement&&t((function(){e.find("[data-plugin-float-element]:not(.manual)").each((function(){var n,e=t(this),i=o.getOptions(e.data("plugin-options"));i&&(n=i),e.themePluginFloatElement(n)}))}))}))}(window.jQuery,window.theme);
Save
Cancel