Server IP : 162.0.217.223 / Your IP : 216.73.216.150 Web Server : LiteSpeed System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : mypckeys ( 1539) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/mypckeys/www/wp-content/themes/woodmart/js/scripts/global/ |
Upload File : |
woodmartThemeModule.wdElementorAddAction("frontend/element_ready/container",function(){woodmartThemeModule.stickyContainer()});let windowWidth=woodmartThemeModule.windowWidth;woodmartThemeModule.stickyContainer=function(){function c(){return document.querySelector("html").hasAttributes("dir")&&"rtl"===document.querySelector("html").getAttribute("dir")}function a(t,n){var e=Object.keys(n);0!==e.length&&e.forEach(function(e){t.style[e]=n[e]})}function w(e,t){var n=window.getComputedStyle(e),n={position:"fixed",width:n.width,marginTop:n.marginTop,marginBottom:n.marginBottom,top:t+"px",bottom:"",zIndex:99};return c()?n.insetInlineEnd=e.getBoundingClientRect().left+"px":n.insetInlineStart=e.getBoundingClientRect().left+"px",n}function u(e,t){e.parentNode.removeChild(t),e.style=""}function n(t,n){var i,o,d,s,r,l=t.dataset.id;if(void 0!==l){let e=document.querySelector(`.elementor-element-${l}.wd-sticky-spacer`);n.is_mobile&&!t.classList.contains("wd-sticky-container-mobile-yes")||n.is_tablet&&!t.classList.contains("wd-sticky-container-tablet-yes")||n.is_desktop&&!t.classList.contains("wd-sticky-container-yes")?null!==e&&u(t,e):(l=Array.from(t.classList).find(function(e){return-1!==e.indexOf("wd-sticky-offset")}),n=void 0!==l?parseInt(l.substring(l.lastIndexOf("-")+1)):150,l=woodmartThemeModule.$window.scrollTop(),i=t.offsetHeight,o=t.getBoundingClientRect().top+window.scrollY-n,d=t.parentNode.parentNode.classList.contains("entry-content"),null!==(e=!d&&null===e&&o<l?(s=w(d=t,s=n),(r=d.cloneNode(!0)).classList.add("wd-sticky-spacer"),a(r,{visibility:"hidden"}),d.parentNode.insertBefore(r,d),a(d,s),r):e)&&(d=e.parentNode.getBoundingClientRect().top+window.scrollY-n+e.parentNode.offsetHeight,l<e.getBoundingClientRect().top+window.scrollY-n?u(t,e):"fixed"!==t.style.position&&l<d-i?(void 0===function(t){var n=[];if(t.parentNode){let e=t.parentNode.firstChild;for(;e;)1===e.nodeType&&e!==t&&n.push(e),e=e.nextSibling}return n}(t).find(function(e){return"absolute"===e.style.position})&&a(t.parentNode,{position:""}),a(t,w(e,n))):"absolute"!==t.style.position&&d<o+i&&(a(t.parentNode,{position:"relative"}),a(t,(s=e,r={position:"absolute",top:"",bottom:"0px",zIndex:99},c()?r.insetInlineEnd=s.offsetLeft+"px":r.insetInlineStart=s.offsetLeft+"px",r)))))}}window.addEventListener("scroll",function(){var e=document.querySelectorAll(".wd-sticky-container-yes:not(.wd-sticky-spacer), .wd-sticky-container-tablet-yes:not(.wd-sticky-spacer), .wd-sticky-container-mobile-yes:not(.wd-sticky-spacer)");let t={is_desktop:1024<windowWidth,is_tablet:768<windowWidth&&windowWidth<1024,is_mobile:windowWidth<=768};e.forEach(function(e){n(e,t)})})},window.addEventListener("resize",function(){"undefined"!=typeof elementor&&(windowWidth=isNaN(parseInt(elementor.$preview.css("--e-editor-preview-width")))?1025:parseInt(elementor.$preview.css("--e-editor-preview-width")))}),window.addEventListener("load",function(){woodmartThemeModule.stickyContainer()});