File manager - Edit - /home/antilam/web/antilam.ru/public_html/wp-content/themes/woodmart/js/scripts/elements/slider.min.js
Back
woodmartThemeModule.$document.on("wdShopPageInit wdElementorSectionReady wdElementorColumnReady wdElementorGlobalReady",function(){woodmartThemeModule.sliderAnimations(),woodmartThemeModule.sliderLazyLoad()}),["frontend/element_ready/wd_slider.default"].forEach(function(e){woodmartThemeModule.wdElementorAddAction(e,function(){woodmartThemeModule.sliderAnimations(),woodmartThemeModule.sliderLazyLoad()})}),woodmartThemeModule.sliderClearAnimations=function(e,a){a&&e.querySelectorAll('[class*="wpb_animate"]').forEach(function(e){for(var a,t=Array.from(e.classList),n=0;n<t.length;n++)t[n].indexOf("wd-anim-name_")>=0&&(a=t[n].split("_")[1]);e.classList.contains("wpb_start_animation")&&e.classList.remove("wpb_start_animation"),e.classList.contains("animated")&&e.classList.remove("animated"),e.classList.contains(a)&&e.classList.remove(a)}),e.parentNode.querySelectorAll('[class*="wpb_animate"]').forEach(function(e){for(var a,t=Array.from(e.classList),n=0,i=0;i<t.length;i++)t[i].indexOf("wd-anim-delay_")>=0&&(n=parseInt(t[i].split("_")[1])),t[i].indexOf("wd-anim-name_")>=0&&(a=t[i].split("_")[1]);setTimeout(function(){e.classList.contains("wpb_start_animation")&&e.classList.remove("wpb_start_animation"),e.classList.contains("animated")&&e.classList.remove("animated"),e.classList.contains(a)&&e.classList.remove(a)},n)})},woodmartThemeModule.sliderAnimations=function(){document.querySelectorAll(".wd-slider > .wd-carousel-inner > .wd-carousel").forEach(function(e){function a(e,a=!1){woodmartThemeModule.sliderClearAnimations(e,a),woodmartThemeModule.runAnimations(e,a)}e.querySelectorAll('[class*="wd-animation"]').forEach(function(e){e.classList.add("wd-animation-ready")}),a(e.querySelector(".wd-slide"),!0),e.addEventListener("wdSlideChange",function(e){var t=Array.prototype.filter.call(e.target.swiper.wrapperEl.children,a=>e.detail.activeIndex==a.dataset.swiperSlideIndex).shift();t||(t=e.target.swiper.wrapperEl.children[e.detail.activeIndex]),a(t),woodmartThemeModule.$document.trigger("wood-images-loaded")})})},woodmartThemeModule.runAnimations=function(e,a){e.parentElement.querySelectorAll('[class*="wd-animation"]').forEach(function(e){e.classList.remove("wd-animated"),e.classList.remove("wd-in")}),e.querySelectorAll('[class*="wd-animation"]').forEach(function(e){var a=0;e.classList.forEach(e=>{e.includes("wd_delay_")&&(a=parseInt(e.split("_")[2]))}),setTimeout(function(){e.classList.add("wd-animated"),e.classList.add("wd-in")},a)}),e.querySelectorAll('[class*="wpb_animate"]').forEach(function(e){for(var a=e.classList,t=0,n=0;n<a.length;n++)a[n].indexOf("wd-anim-delay_")>=0&&(t=parseInt(a[n].split("_")[1])),a[n].indexOf("wd-anim-name_")>=0&&a[n].split("_")[1];setTimeout(function(){e.classList.remove("wd-off-anim"),e.classList.add("wpb_start_animation"),e.classList.add("animated")},t)})},woodmartThemeModule.sliderLazyLoad=function(){const e=document.querySelectorAll(".wd-slider > .wd-carousel-inner > .wd-carousel");function a(e){e&&e.nextElementSibling&&e.nextElementSibling.classList.add("woodmart-loaded"),e.classList.add("woodmart-loaded"),e.closest(".wd-carousel").querySelectorAll('[id="'+e.id+'"]').forEach(function(e){e.classList.add("woodmart-loaded")})}window.addEventListener("wdEventStarted",function(){e.forEach(function(e){a(e.querySelector(".wd-carousel-wrap").firstElementChild)})}),e.forEach(function(e){e.addEventListener("wdSlideChange",function(e){var t=Array.prototype.filter.call(e.target.swiper.wrapperEl.children,a=>e.detail.activeIndex==a.dataset.swiperSlideIndex).shift();t||(t=Array.prototype.filter.call(e.target.swiper.wrapperEl.children,e=>e.classList.contains("woodmart-loaded")&&e.nextElementSibling?e.nextElementSibling:null).shift()),a(t)})})},window.addEventListener("load",function(){woodmartThemeModule.sliderLazyLoad(),woodmartThemeModule.sliderAnimations()});
| ver. 1.4 |
Github
|
.
| PHP 8.4.22 | Generation time: 0.11 |
proxy
|
phpinfo
|
Settings