Root Zanli
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
o5t6x7pgljbm
/
public_html
/
tuitioncoin.org
/
assets
/
vendor
/
jarallax
/
dist
/
Filename :
jarallax-element.min.js
back
Copy
/*! * DEPRECATED Elements Extension for Jarallax. Use lax.js instead https://github.com/alexfoxy/lax.js */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).jarallaxElement=t()}(this,(function(){"use strict";let e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var t,o=e;function n(e=o.jarallax){if(console.warn("Jarallax Element extension is DEPRECATED, please, avoid using it. We recommend you look at something like `lax.js` library <https://github.com/alexfoxy/lax.js>. It is much more powerful and has a less code (in cases when you don't want to add parallax backgrounds)."),void 0===e)return;const t=e.constructor;["initImg","canInitParallax","init","destroy","coverImage","isVisible","onScroll","onResize"].forEach((e=>{const o=t.prototype[e];t.prototype[e]=function(...t){const n=this;if("initImg"===e&&null!==n.$item.getAttribute("data-jarallax-element")&&(n.options.type="element",n.pureOptions.speed=n.$item.getAttribute("data-jarallax-element")||"100"),"element"!==n.options.type)return o.apply(n,t);switch(n.pureOptions.threshold=n.$item.getAttribute("data-threshold")||"",e){case"init":{const e=`${n.pureOptions.speed}`.split(" ");n.options.speed=n.pureOptions.speed||0,n.options.speedY=e[0]?parseFloat(e[0]):0,n.options.speedX=e[1]?parseFloat(e[1]):0;const a=n.pureOptions.threshold.split(" ");n.options.thresholdY=a[0]?parseFloat(a[0]):null,n.options.thresholdX=a[1]?parseFloat(a[1]):null,o.apply(n,t);const s=n.$item.getAttribute("data-jarallax-original-styles");return s&&n.$item.setAttribute("style",s),!0}case"onResize":{const e=n.css(n.$item,"transform");n.css(n.$item,{transform:""});const t=n.$item.getBoundingClientRect();n.itemData={width:t.width,height:t.height,y:t.top+n.getWindowData().y,x:t.left},n.css(n.$item,{transform:e});break}case"onScroll":{const e=n.getWindowData(),t=(e.y+e.height/2-n.itemData.y-n.itemData.height/2)/(e.height/2),o=t*n.options.speedY,a=t*n.options.speedX;let s=o,i=a;null!==n.options.thresholdY&&o>n.options.thresholdY&&(s=0),null!==n.options.thresholdX&&a>n.options.thresholdX&&(i=0),n.css(n.$item,{transform:`translate3d(${i}px,${s}px,0)`});break}case"initImg":case"isVisible":case"coverImage":return!0}return o.apply(n,t)}}))}return n(),t=()=>{void 0!==o.jarallax&&o.jarallax(document.querySelectorAll("[data-jarallax-element]"))},"complete"===document.readyState||"interactive"===document.readyState?t():document.addEventListener("DOMContentLoaded",t,{capture:!0,once:!0,passive:!0}),n}));//# sourceMappingURL=jarallax-element.min.js.map