PageSourceSearch

https://www.rockler.com/static/version1790230274/frontend/Forix/Retail/en_US/js/custom.min.js

js rockler.com collected 2026-09-24 08:39:13 UTC 13,022 bytes, 15 lines download raw bytes

1require(['jquery','matchMedia','slick'],function($){'use strict';if(typeof fx=="undefined"){var fx={};}
2fx.Scripts={init:function(){this.homeBannerSlider();this.homeBrandsSlider();this.searchPringsFiltersCustom();this.woodworkingClasses();this.toggleFilterCategoriesBlog();this.findNearStore();this.changeTextDataShare();this.moveLoginLink();this.scrollToSecFAQs();this.scrollToDynamic();this.homeBannerControl('.home-banner-slider');this.homeBannerControl('.home-rotate-banner');this.isNotMacBook();this.faqsPDP();this.amxnotif();this.subcategoriesBannerSlider();this.shopByBrandSlider();this.moreExclusiveDealsSlider();this.shopByCategorySlider();this.workshopAccessoriesSlider();},homeBannerSlider:function(){const $bannerSlider=$('.home-banners');$bannerSlider.slick({slidesToShow:1,slidesToScroll:1,autoplay:false,autoplaySpeed:2000,arrows:true,dots:false,infinite:false,responsive:[{breakpoint:767,settings:{dots:true,arrows:false}}],});$bannerSlider.on('afterChange',function(event,slick,currentSlide){$bannerSlider.attr('aria-roledescription',`Slide ${currentSlide + 1} of ${slick.slideCount}`);var video=document.getElementById('banner-video');if(video){video.play();}});},homeBannerControl:function(element){$(document).ready(function(){if($(element).length){const observer=new MutationObserver((mutations,obs)=>{const $slider=document.querySelector(element+' .slick-slider');if($slider){obs.disconnect();const $jSlider=$(element+' .slick-slider');const $controlButton=$(element+' .button-control-slider .pagebuilder-button-link');const $controlText=$controlButton.find('span');let isPaused=false;const slickInstance=$jSlider.slick('getSlick');if(slickInstance?.options?.autoplay){$controlButton.addClass('active');}
3$controlButton.attr({'role':'button','aria-pressed':'false','tabindex':'0','aria-label':'Pause slider autoplay'});$controlButton.on('click',function(){toggleSliderState();});$controlButton.on('keydown',function(e){if(e.key==='Enter'||e.key===' '||e.keyCode===13||e.keyCode===32){e.preventDefault();toggleSliderState();}});function toggleSliderState(){if(isPaused){$jSlider.slick('slickPlay');$controlText.text('Pause');$controlButton.attr({'aria-pressed':'false','aria-label':'Pause slider autoplay'});}else{$jSlider.slick('slickPause');$controlText.text('Play');$controlButton.attr({'aria-pressed':'true','aria-label':'Play slider autoplay'});}
4isPaused=!isPaused;}}});observer.observe(document.querySelector(element),{childList:true,subtree:true});}})},homeBrandsSlider:function(){const options={autoplay:false,autoplaySpeed:2000,arrows:false,dots:false,infinite:false,variableWidth:true,swipe:true}
5mediaCheck({media:'(max-width: 1280px)',entry:$.proxy(function(){setTimeout(function(){const $slider=$('.most-popular-brands .row-full-width-inner');if(window.matchMedia('(max-width: 480px)').matches){$slider.slick({...options,slidesToShow:2.5,slidesToScroll:1,});}else if(window.matchMedia('(max-width: 768px)').matches){$slider.slick({...options,slidesToShow:3.5,slidesToScroll:2,});}else if(window.matchMedia('(max-width: 1024px)').matches){$slider.slick({...options,slidesToShow:4.5,slidesToScroll:3,});}else{$slider.slick({...options,slidesToShow:5.5,slidesToScroll:4});}
6$slider.on('afterChange',function(event,slick,currentSlide){$slider.attr('aria-roledescription',`Slide ${currentSlide + 1} of ${slick.slideCount}`);});},1000);},this),exit:$.proxy(function(){const $slider=$('.most-popular-brands .row-full-width-inner');if($slider.hasClass('slick-initialized')){$slider.slick('unslick');}},this),});},searchPringsFiltersCustom:function(){$(".ss-sidebar-container .filter-content").on('click','.block-subtitle',function(){$('body').removeClass('filter-active');});},woodworkingClasses:function(){$('.woodworking-classes-block-links .block-title').on('click',function(){$(this).toggleClass('active');$('.woodworking-classes-block-links ul').toggleClass('active');});},toggleFilterCategoriesBlog:function(){$(document).on('click','.ExpandableContent-Button',function(){$(this).toggleClass('is-open');$('.ExpandableContent-Content').toggleClass('is-open');$(this).attr('aria-expanded',$(this).hasClass('is-open'));});$(document).on('click',function(e){if(!$(e.target).closest('.block-categories .ExpandableContent ').length){$('.ExpandableContent-Content').removeClass('is-open');$('.ExpandableContent-Button').attr('aria-expanded',false).removeClass('is-open');}});const expandableButton=$('.ExpandableContent-Button'),expandableContent=$('.ExpandableContent-Content');expandableButton.on('keydown',function(event){const keyCode=event.which;if(keyCode===13){event.preventDefault();expandableButton.trigger('click');}
7if(keyCode===27&&expandableButton.hasClass('is-open')){event.preventDefault();element.trigger('click');}});expandableContent.find('a').on('keydown',function(event){const keyCode=event.which;if(keyCode===27&&expandableButton.hasClass('is-open')){event.preventDefault();expandableButton.trigger('click');}});const capture=expandableContent.attr('tabindex','-1').focus().key
7down(function handleKeydown(event){if(event.key.toLowerCase()!=='tab'){return;}
8var tabbable=$().add(capture.find('button, input, select, textarea')).add(capture.find('[href]')).add(capture.find("[tabindex]:not([tabindex='-1'])"));var target=$(event.target);if(event.shiftKey){if(target.is(capture)||target.is(tabbable.first())){event.preventDefault();tabbable.last().focus();}}else{if(target.is(tabbable.last())){event.preventDefault();tabbable.first().focus();}}});},findNearStore:function(){$(document).on('click',".StoreFinderDropdown-Button",function(){const value=$("#store-options-dropdown option").filter(":selected").val();if(value){window.location.assign(`/retail/stores/${value}`)}});},changeTextDataShare:function(){$(document).on('click','#datashare a',function(e){e.preventDefault();$(this).hide();$('#datashare p strong').text('STATUS: Data Sharing is Enabled')});},moveLoginLink:function(){mediaCheck({media:'(max-width: 1023px)',entry:$.proxy(function(){$('.button-logout-mobile').remove();$('<div class="button-logout-mobile">'+$('.logout-link').html()+'</div>').detach().insertAfter('.block.account-nav');},this),exit:$.proxy(function(){$('.button-logout-mobile').remove();},this),});},scrollToSecFAQs:function(){$('.CMSFAQsPage-LinksList').on('click','a',function(e){const target=$(this).attr('href');if($(target).length){$('html, body').animate({scrollTop:$(target).offset().top-100},500);}});$(document).ready(function(){if(window.location.hash&&$('body').hasClass('cms-faq-ordering')){window.scrollTo(0,0);setTimeout(function(){if(window.location.hash){const hash=window.location.hash;console.log('hash',hash);if($(hash).length){$('html, body').animate({scrollTop:$(hash).offset().top-100},500);}}},2000);}});},scrollToDynamic:function(e){$(document).on('click','a',function(e){var href=$(this).attr('href');if(href&&href.startsWith('#')&&href.length>1&&!$(this).hasClass('ui-tabs-anchor')){var $target=$(href);if(!$target.length){return;}
9e.preventDefault();var $header=$('.header-container-sticky');if($target.length){var headerHeight=$header.outerHeight(true)||0;$('html, body').animate({scrollTop:$target.offset().top-headerHeight-30},1000);}}});},isNotMacBook:function(){const isFirefox=navigator.userAgent.toLowerCase().includes('firefox');var isMac=navigator.platform.toUpperCase().indexOf('MAC')>=0;var isMobile=/Mobi/i.test(navigator.userAgent);if((isMac||isFirefox)&&!isMobile){$('body').removeClass('not_mac');}else{$('body').addClass('not_mac');}},faqsPDP:function(){$('.pdp-faqs-question').on('click',function(e){e.preventDefault();$(this).toggleClass('active');$(this).next('.pdp-faqs-answer').slideToggle();});},amxnotif:function(e){if(window.matchMedia('(max-width: 767px)').matches){$('.table-wrapper.grouped .item').each(function(){$(this).find('.amxnotif-block').remove().appendTo($(this).find('.product-item-info'));});}else{$('.table-wrapper.grouped .item').each(function(){$(this).find('.amxnotif-block').remove().prependTo($(this).find('.box-price'));});}},subcategoriesBannerSlider:function(){$('.hero-subcategories-slider .pagebuilder-column-line').each(function(){var $subcategoriesSlider=$(this);if($subcategoriesSlider.hasClass('slick-initialized')){return;}
10var $subcategoriesRow=$subcategoriesSlider.closest('.row-hero-subcategories');var titleCatalog=$subcategoriesRow.siblings('.hero-banner-with-image').first().find('.banner-title').first().text().trim();var buttonTitle=titleCatalog?`${titleCatalog} carousel`:'Subcategories carousel';$subcategoriesSlider.attr({'role':'region','aria-label':buttonTitle});$subcategoriesSlider.slick({slidesToShow:8,slidesToScroll:8,autoplay:false,autoplaySpeed:2000,arrows:true,dots:false,infinite:false,prevArrow:`<button type="button" class="slick-prev slick-arrow" aria-label="Previous ${buttonTitle}" tabindex="0">Previous ${buttonTitle}</button>`,nextArrow:`<button type="button" class="slick-next slick-arrow" aria-label="Next ${buttonTitle}" tabindex="0">Next ${buttonTitle}</button>`,responsive:[{breakpoint:1200,settings:{slidesToShow:6,slidesToScroll:6,}},{breakpoint:900,settings:{slidesToShow:4,slidesToScroll:4,}},{breakpoint:767,settings:{slidesToShow:2,slidesToScroll:2,}}],});});},shopByBrandSlider:function(){$('.cms-shop-by-brand').each(function(){var $brandBlock=$(this);var title=$brandBlock.find('.heading-title-h2').first().text().trim()||'Brand';$brandBlock.find('.pagebuilder-column-line').each(function(){var $shopByBrandSlider=$(this);if($shopByBrandSlider.hasClass('slick-initialized')){return;}
11$shopByBrandSlider.slick({slidesToShow:4,slidesToScroll:4,autoplay:false,arrows:true,prevArrow:`<button type="button" class="slick-prev slick-arrow" aria-label="Previous ${title}" tabindex="0">Previous ${title}</button>`,nextArrow:`<button type="button" class="slick-next slick-arrow" aria-label="Next ${title}" tabindex="0">Next ${title}</button>`,dots:false,infinite:false,responsive:[{breakpoint:1024,settings:{slidesToShow:4,slidesToScroll:4,}},{breakpoint:900,settings:{slidesToShow:3,slidesToScroll:3,}},{breakpoint:767,settings:{slidesToShow:2,slidesToScroll:2,}}],});});});}
11,moreExclusiveDealsSlider:function(){$('.more-exclusive-deals').each(function(){var $dealsBlock=$(this);var title=$dealsBlock.find('.heading-title-h3').first().text().trim();$dealsBlock.find('.more-exclusive-deals-slider .pagebuilder-column-line').each(function(){var $exclusiveDealsSlider=$(this);if($exclusiveDealsSlider.hasClass('slick-initialized')){return;}
12$exclusiveDealsSlider.slick({slidesToShow:5,slidesToScroll:5,autoplay:false,arrows:true,prevArrow:`<button type="button" class="slick-prev slick-arrow" aria-label="Previous ${title}" tabindex="0">Previous ${title}</button>`,nextArrow:`<button type="button" class="slick-next slick-arrow" aria-label="Next ${title}" tabindex="0">Next ${title}</button>`,dots:false,infinite:false,responsive:[{breakpoint:1024,settings:{slidesToShow:5,slidesToScroll:5,}},{breakpoint:900,settings:{slidesToShow:3,slidesToScroll:3,}},{breakpoint:767,settings:{slidesToShow:2,slidesToScroll:2,}}],});});});},shopByCategorySlider:function(){$('.cms-shop-by-category').each(function(){var $categoryBlock=$(this);var title=$categoryBlock.find('.heading-title-h3').first().text().trim()||'Category';$categoryBlock.find('.pagebuilder-column-line').each(function(){var $shopByCategorySlider=$(this);if($shopByCategorySlider.hasClass('slick-initialized')){return;}
13$shopByCategorySlider.slick({slidesToShow:9,slidesToScroll:9,autoplay:false,arrows:true,prevArrow:`<button type="button" class="slick-prev slick-arrow" aria-label="Previous ${title}" tabindex="0">Previous ${title}</button>`,nextArrow:`<button type="button" class="slick-next slick-arrow" aria-label="Next ${title}" tabindex="0">Next ${title}</button>`,dots:false,infinite:false,responsive:[{breakpoint:1280,settings:{slidesToShow:6,slidesToScroll:6,}},{breakpoint:900,settings:{slidesToShow:4,slidesToScroll:4,}},{breakpoint:767,settings:{slidesToShow:2,slidesToScroll:2,}}],});});});},workshopAccessoriesSlider:function(){$('.cms-workshop-accessories').each(function(){var $workshopBlock=$(this);var title=$workshopBlock.find('.workshop__left .heading-title-h2').first().text().trim()||'Workshop Accessories';var $workshopAccessoriesSlider=$workshopBlock.find('.workshop-cards');mediaCheck({media:'(max-width: 767px)',entry:function(){$workshopAccessoriesSlider.each(function(){var $slider=$(this);if($slider.hasClass('slick-initialized')){return;}
14$slider.slick({slidesToShow:2,slidesToScroll:1,autoplay:false,arrows:true,prevArrow:`<button type="button" class="slick-prev slick-arrow" aria-label="Previous ${title}" tabindex="0">Previous ${title}</button>`,nextArrow:`<button type="button" class="slick-next slick-arrow" aria-label="Next ${title}" tabindex="0">Next ${title}</button>`,dots:false,infinite:false,});});},exit:function(){$workshopAccessoriesSlider.each(function(){var $slider=$(this);if($slider.hasClass('slick-initialized')){$slider.slick('unslick');}});},});});}}
15fx.Scripts.init();});

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.