diff --git a/assets/details-disclosure.js b/assets/details-disclosure.js index b98d3ebf61..34ed1d0cb9 100644 --- a/assets/details-disclosure.js +++ b/assets/details-disclosure.js @@ -42,27 +42,27 @@ class HeaderMenu extends DetailsDisclosure { constructor() { super(); this.header = document.querySelector('.header-wrapper'); - this.megaMenu = document.querySelector('.mega-menu'); + // this.megaMenu = document.querySelector('.mega-menu'); } onToggle() { - if (this.megaMenu) { - var parentLinks = document.querySelectorAll('details.mega-menu'); - parentLinks.forEach(function (parentLink) { - loadImages(parentLink); - }); - function loadImages(menuItem) { - var images = menuItem.querySelectorAll('.custom-lazyload'); - if (!images.length) return; - images.forEach(function (image) { - if (image.dataset.src) { - image.src = image.dataset.src; - image.removeAttribute('data-src'); - image.classList.remove('custom-lazyload'); - } - }); - } - } + // if (this.megaMenu) { + // var parentLinks = document.querySelectorAll('details.mega-menu'); + // parentLinks.forEach(function (parentLink) { + // loadImages(parentLink); + // }); + // function loadImages(menuItem) { + // var images = menuItem.querySelectorAll('.custom-lazyload'); + // if (!images.length) return; + // images.forEach(function (image) { + // if (image.dataset.src) { + // image.src = image.dataset.src; + // image.removeAttribute('data-src'); + // image.classList.remove('custom-lazyload'); + // } + // }); + // } + // } if (!this.header) return; this.header.preventHide = this.mainDetailsToggle.open; diff --git a/snippets/header-mega-menu.liquid b/snippets/header-mega-menu.liquid index dbacb656c4..9d57e95132 100644 --- a/snippets/header-mega-menu.liquid +++ b/snippets/header-mega-menu.liquid @@ -96,7 +96,8 @@ {{ block.settings.promotional_image.alt | escape }}