PageSourceSearch

https://nakednutrition.com/cdn/shop/t/717/assets/oddit-section-col…?v=169669444085274931001786476012

js nakednutrition.com collected 2026-09-24 18:14:07 UTC 3,109 bytes, 2 lines download raw bytes

1(function(){function initCollectionTabGrid(sectionEl){var section=sectionEl||document.querySelector(".oddit-section-collection-tab-grid");if(!section)return;var tabs=section.querySelectorAll(".oddit-section-collection-tab-grid__tab"),panels=section.querySelectorAll("[data-tab-content]"),ctaDesktop=section.querySelector("[data-cta]"),ctaMobile=section.querySelector("[data-cta-mobile]");tabs.forEach(function(tab){tab.addEventListener("click",function(){var tabId=tab.getAttribute("data-tab");tabs.forEach(function(t){t.classList.remove("oddit-section-collection-tab-grid__tab--active"),t.setAttribute("aria-selected","false")}),tab.classList.add("oddit-section-collection-tab-grid__tab--active"),tab.setAttribute("aria-selected","true"),panels.forEach(function(panel){panel.getAttribute("data-tab-content")===tabId?panel.removeAttribute("hidden"):panel.setAttribute("hidden","")});var ctaLabel=tab.getAttribute("data-cta-label"),ctaLink=tab.getAttribute("data-cta-link");ctaDesktop&&(ctaDesktop.textContent=ctaLabel,ctaDesktop.setAttribute("href",ctaLink||"#")),ctaMobile&&(ctaMobile.textContent=ctaLabel,ctaMobile.setAttribute("href",ctaLink||"#")),currentPage=0;var activeGrid=getActiveGrid();activeGrid&&activeGrid.scrollTo({left:0,behavior:"instant"}),updateDots()})});var prevBtn=section.querySelector(".oddit-section-collection-tab-grid__arrow--prev"),nextBtn=section.querySelector(".oddit-section-collection-tab-grid__arrow--next"),dots=section.querySelectorAll(".oddit-section-collection-tab-grid__dot"),totalPages=dots.length,currentPage=0;function getActiveGrid(){return section.querySelector("[data-tab-content]:not([hidden])")}function scrollToPage(page){page<0&&(page=0),page>=totalPages&&(page=totalPages-1),currentPage=page;var grid=getActiveGrid();grid&&(page===0?grid.scrollTo({left:0,behavior:"smooth"}):grid.scrollTo({left:grid.scrollWidth-grid.clientWidth,behavior:"smooth"}),updateDots())}function updateDots(){dots.forEach(function(dot,index){dot.classList.toggle("oddit-section-collection-tab-grid__dot--active",index===currentPage)})}prevBtn&&prevBtn.addEventListener("click",function(){scrollToPage(currentPage-1)}),nextBtn&&nextBtn.addEventListener("click",function(){scrollToPage(currentPage+1)}),dots.forEach(function(dot,index){dot.addEventListener("click",function(){scrollToPage(index)}),dot.style.cursor="pointer"});function bindGridScroll(grid){if(grid){var scrollTimeout;grid.addEventListener("scroll",function(){clearTimeout(scrollTimeout),scrollTimeout=setTimeout(function(){var maxScroll=grid.scrollWidth-grid.clientWidth;if(!(maxScroll<=0)){var newPage=grid.scrollLeft>maxScroll*.5?1:0;newPage!==currentPage&&(currentPage=newPage,updateDots())}},100)})}}panels.forEach(function(panel){bindGridScroll(panel)})}initCollectionTabGrid(),Shopify&&Shopify.designMode&&document.addEventListener("shopify:section:load",function(event){var section=event.target.querySelector(".oddit-section-collection-tab-grid");section&&initCollectionTabGrid(section)})})();
2//# sourceMappingURL=/cdn/shop/t/717/assets/oddit-section-collection-tab-grid.js.map?v=169669444085274931001786476012

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.