File manager - Edit - /home/acsexpp/www/wp-content/plugins/kadence-blocks/includes/assets/js/kb-header-sticky-image.min.js
Back
class KBStickyImage{constructor(a,b={}){this.root="string"==typeof a?document.querySelector(a):a,this.state="CREATED",this.isLogo=this.root.classList.contains("kb-identity"),this.standardElem=this.isLogo?this.root.querySelector(".custom-logo"):this.root.querySelector(".kb-img:not(.kb-img-sticky):not(.kb-img-transparent)"),this.stickyElem=this.root.querySelector(".kb-img-sticky"),this.transparentElem=this.root.querySelector(".kb-img-transparent"),this.isSticking=!1,this.stickyElem&&this.initStickyTracking(),this.emitEvent("MOUNTED"),this.state="IDLE"}initStickyTracking(){window.addEventListener("KADENCE_HEADER_STICKY_CHANGED",this.toggleSticky.bind(this))}toggleSticky({isSticking:a}){this.isSticking=a,a?this.setStickyStyles():this.setStandardStyles()}setStickyStyles(){this.stickyElem&&(this.stickyElem.style.display="initial"),this.standardElem&&(this.standardElem.style.display="none"),this.transparentElem&&(this.transparentElem.style.display="none")}setStandardStyles(){this.standardElem&&(this.standardElem.style.display="initial"),this.stickyElem&&(this.stickyElem.style.display="none"),this.transparentElem&&!this.isLogo&&(this.transparentElem.style.display="none")}get state(){return this._state}set state(a){this._state=a,this.emitEvent("STATE",{val:a})}emitEvent(a,b={}){const c=new CustomEvent(a,{bubbles:!0,detail:b});this.root.dispatchEvent(c)}}function initKBImages(){const a=document.querySelectorAll(".wp-block-kadence-image, .wp-block-kadence-identity");window.KBStickyBlocks=Array.from(a).map(a=>new KBStickyImage(a))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",initKBImages):initKBImages(),window.KBStickyImage=KBStickyImage;
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings