1/** 2 * Homepage-only scripts (index-2024.php). Loaded with defer after jquery.pagelayout.js. 3 */ 4(function () { 5 if (typeof jQuery === 'undefined') { 6 return; 7 } 8 9 function observeAnimate(target, options) { 10 if (!target || typeof IntersectionObserver === 'undefined') { 11 return null; 12 } 13 14 var settings = options || {}; 15 var observer = new IntersectionObserver(function (entries) { 16 entries.forEach(function (entry) { 17 if (!entry.isIntersecting) { 18 return; 19 } 20 21 var delay = settings.delay || 0; 22 if (delay > 0) { 23 setTimeout(function () { 24 entry.target.classList.add('animate'); 25 }, delay); 26 } else { 27 entry.target.classList.add('animate'); 28 } 29 30 observer.unobserve(entry.target); 31 }); 32 }, { 33 threshold: settings.threshold != null ? settings.threshold : 0.1, 34 rootMargin: settings.rootMargin || '0px 0px -100px 0px' 35 }); 36 37 observer.observe(target); 38 return observer; 39 } 40 41 var HOME_HASH_TARGETS = ['#popular-logo-industries', '#letter-logos', '#letters-shapes-styles']; 42 43 function normalizePathname(pathname) { 44 if (!pathname || pathname === '/') { 45 return '/'; 46 } 47 48 return pathname.replace(/\/+$/, '') || '/'; 49 } 50 51 function isSamePagePath(url) { 52 var current = normalizePathname(window.location.pathname); 53 var target = normalizePathname(url.pathname); 54 55 if (current === target) { 56 return true; 57 } 58 59 return (current === '/' || current === '/index.php') && 60 (target === '/' || target === '/index.php'); 61 } 62 63 function resolveHomeHashTarget(hash) { 64 if (hash === '#popular-logo-industries') { 65 var section = document.querySelector('#popular-logo-industries'); 66 if (!section) { 67 return null; 68 } 69 70 return section.querySelector('.home-industry-finder__title') || section; 71 } 72 73 if (hash === '#letters-shapes-styles' || hash === '#letter-logos') { 74 return document.querySelector(hash); 75 } 76 77 return document.querySelector(hash); 78 } 79 80 function getFixedHeaderScrollOffset() { 81 var header = document.querySelector('.headline.header'); 82 if (!header) { 83 return 100; 84 } 85 86 var position = window.getComputedStyle(header).position; 87 if (position !== 'fixed' && position !== 'sticky') { 88 return 24; 89 } 90 91 return Math.ceil(header.getBoundingClientRect().height) + 40; 92 } 93 94 function scrollToHomeHash(hash, behavior) { 95 if (!hash || HOME_HASH_TARGETS.indexOf(hash) === -1) { 96 return false; 97 } 98 99 var target = resolveHomeHashTarget(hash); 100 if (!target) { 101 return false; 102 } 103 104 var top = target.getBoundingClientRect().top + window.pageYOffset - getFixedHeaderScrollOffset(); 105 window.scrollTo({ 106 top: Math.max(0, top), 107 behavior: behavior || 'auto' 108 }); 109 110 return true; 111 } 112 113 function scheduleHomeHashScroll(behavior) { 114 var hash = window.location.hash; 115 if (!hash || HOME_HASH_TARGETS.indexOf(hash) === -1) { 116 return; 117 } 118 119 scrollToHomeHash(hash, behavior || 'auto'); 120 requestAnimationFrame(function () { 121 scrollToHomeHash(hash, behavior || 'auto'); 122 }); 123 setTimeout(function () { 124 scrollToHomeHash(hash, behavior || 'auto'); 125 }, 150); 126 setTimeout(function () { 127 scrollToHomeHash(hash, behavior || 'auto'); 128 }, 400); 129 } 130 131 function isDesktopHomeViewport() { 132 return window.matchMedia('(min-width: 769px)').matches; 133 } 134 135 function initHomeHeroScrollPosition() { 136 if (!document.body.classList.contains('page-home')) { 137 return; 138 } 139 140 if (!isDesktopHomeViewport()) { 141 return; 142 } 143 144 if (window.location.hash) { 145 return; 146 } 147 148 if ('scrollRestoration' in history) { 149 history.scrollRestoration = 'manual'; 150 } 151 152 var heroInput = document.querySelector('#company-name-form-home-hero .js-company-name-input'); 153 if (heroInput) { 154 heroInput.removeAttribute('autofocus'); 155 } 156 157 function scrollToTop() { 158 window.scrollTo(0, 0); 159 } 160 161 scrollToTop(); 162 requestAnimationFrame(scrollToTop); 163 window.addEventListener('load', scrollToTop); 164 } 165 166 function initHomeHashScroll() { 167 if (window.location.hash) { 168 scheduleHomeHashScroll('auto'); 169 window.addEventListener('load', function () { 170 scheduleHomeHashScroll('auto'); 171 }); 172 } 173 174 window.addEventListener('hashchange', function () { 175 scheduleHomeHashScroll('auto'); 176 }); 177 178 document.addEventListener('click', function (event) { 179 var link = event.target.closest('a[href]'); 180 if (!link) { 181 return; 182 } 183 184 var href = link.getAttribute('href'); 185 if (!href || href.indexOf('#') === -1) { 186 return; 187 } 188 189 var url; 190 try { 191 url = new URL(href, window.location.origin); 192 } catch (error) { 193 return; 194 } 195 196 if (!isSamePagePath(url) || HOME_HASH_TARGETS.indexOf(url.hash) === -1) { 197 return; 198 } 199 200 if (!resolveHomeHashTarget(url.hash)) { 201 return; 202 } 203 204 event.preventDefault(); 205 206 if (window.history && window.history.pushState) { 207 window.history.pushState(null, '', url.pathname + url.search + url.hash); 208 } else { 209 window.location.hash = url.hash; 210 } 211 212 scheduleHomeHashScroll('smooth'); 213 }, true); 214 } 215 216 function initHomeSectionOrder() { 217 var differentSection = document.querySelector('.page-home .headline-different'); 218 var showcaseSection = document.querySelector('.page-home .logo-showcase-section'); 219 220 if (!differentSection || !showcaseSection || differentSection.parentNode !== showcaseSection.parentNode) { 221 return; 222 } 223 224 var parent = differentSection.parentNode; 225 var mobileQuery = window.matchMedia('(max-width: 768px)'); 226 227 function applySectionOrder() { 228 if (mobileQuery.matches) { 229 parent.insertBefore(showcaseSection, differentSection); 230 } else { 231 parent.insertBefore(differentSection, showcaseSection); 232 } 233 } 234 235 applySectionOrder(); 236 237 if (typeof mobileQuery.addEventListener === 'function') { 238 mobileQuery.addEventListener('change', applySectionOrder); 239 } else if (typeof mobileQuery.addListener === 'function') { 240 mobileQuery.addListener(applySectionOrder); 241 } 242 } 243 244 function initScrollAnimations() { 245 document.querySelectorAll('.headline-step-responsive .step-image:not(.step-1)').forEach(function (element) { 246 observeAnimate(element, { 247 threshold: 0.3, 248 rootMargin: '0px 0px -50px 0px', 249 delay: 50 250 }); 251 }); 252 253 observeAnimate(document.querySelector('.page-home .home-different-grid')); 254 observeAnimate(document.querySelector('.page-home .helpful-resources-section .resources-grid')); 255 observeAnimate(document.querySelector('.logo-showcase-section .logo-grid')); 256 observeAnimate(document.querySelector('.page-home .home-products-showcase__grid')); 257 observeAnimate(document.querySelector('.page-home .info-split-section .header-text-wrapper')); 258 observeAnimate(document.querySelector('.page-home .info-split-section .split-content-wrapper')); 259 observeAnimate(document.querySelector('.testimonials-section .testimonials-container')); 260 observeAnimate(document.querySelector('.page-home .home-faq-accordion__list')); 261 } 262 263 jQuery.noConflict()(function ($) { 264 var interval = 10000; 265 var groups = $('.page-home .business-group'); 266 var groupCount = groups.length; 267 var productSequenceActive = false;
268 var currentGroup = 0; 269 270 function resetGroupAnimationStates(groupEl) { 271 groupEl.find('.owner-image').removeClass('fade-in'); 272 groupEl.find('.product-image').removeClass('fade-in'); 273 } 274 275 function startProductSequence(groupEl) { 276 productSequenceActive = true; 277 var products = groupEl.find('.product-image'); 278 279 products.removeClass('fade-in'); 280 281 products.each(function (index) { 282 var product = this; 283 setTimeout(function () { 284 $(product).addClass('fade-in'); 285 }, 200 + (index * 200)); 286 }); 287 288 setTimeout(function () { 289 productSequenceActive = false; 290 }, 1200); 291 } 292 293 function fadeInHomeHeroContent() { 294 $('.page-home .headline.first-line .main-block-header-left').addClass('fade-in'); 295 } 296 297 function startOwnerAndHeaderSequence(groupEl, isInitialLoad) { 298 groupEl.find('.owner-image').addClass('fade-in'); 299 300 if (isInitialLoad) { 301 fadeInHomeHeroContent(); 302 } 303 304 setTimeout(function () { 305 startProductSequence(groupEl); 306 }, 200); 307 } 308 309 function cycleBusinessGroups() { 310 if (productSequenceActive || groupCount < 2) { 311 return; 312 } 313 314 var nextGroup = (currentGroup + 1) % groupCount; 315 var currentGroupEl = $(groups[currentGroup]); 316 var nextGroupEl = $(groups[nextGroup]); 317 318 currentGroupEl.addClass('fade-out'); 319 320 setTimeout(function () { 321 currentGroupEl.hide().removeClass('fade-out fade-in'); 322 resetGroupAnimationStates(nextGroupEl); 323 nextGroupEl.show().removeClass('fade-out fade-in'); 324 currentGroup = nextGroup; 325 326 setTimeout(function () { 327 nextGroupEl.addClass('fade-in'); 328 startOwnerAndHeaderSequence(nextGroupEl); 329 }, 50); 330 }, 1000); 331 } 332 333 function preloadHomeHeroBackground(done) { 334 var $bg = $('.page-home .background-first-line'); 335 336 if (!$bg.length) { 337 if (done) { 338 done(); 339 } 340 return; 341 } 342 343 $('<img/>').on('load error', function () { 344 $(this).remove(); 345 $bg.addClass('background-loaded'); 346 if (done) { 347 done(); 348 } 349 }).attr('src', '/images/home/bg-header-v3.webp'); 350 } 351 352 function warmSecondaryHeroImages() { 353 // After first paint: fetch ceramics/handyman frames so the 10s cycle 354 // still animates without competing with LCP. Skip on mobile where 355 // .no-responsive hides the whole slider. 356 if (window.matchMedia && window.matchMedia('(max-width: 768px)').matches) { 357 return; 358 } 359 360 groups.slice(1).find('img').each(function () { 361 var src = this.getAttribute('src'); 362 if (!src) { 363 return; 364 } 365 var warmer = new Image(); 366 warmer.decoding = 'async'; 367 warmer.src = src; 368 }); 369 } 370 371 function startHeroSlider() { 372 $(groups[0]).addClass('fade-in'); 373 startOwnerAndHeaderSequence($(groups[0]), true); 374 375 if (groupCount > 1) { 376 setInterval(cycleBusinessGroups, interval); 377 if (window.requestIdleCallback) { 378 window.requestIdleCallback(warmSecondaryHeroImages, { timeout: 3000 }); 379 } else { 380 setTimeout(warmSecondaryHeroImages, 2000); 381 } 382 } 383 } 384 385 if (groupCount > 0) { 386 preloadHomeHeroBackground(function () { 387 startHeroSlider(); 388 }); 389 } else { 390 preloadHomeHeroBackground(fadeInHomeHeroContent); 391 var currentImage = 0; 392 var images = $('.slider-home img'); 393 var imageCount = images.length; 394 395 function cycleImages() { 396 var nextImage = (currentImage + 1) % imageCount; 397 $(images[currentImage]).fadeOut(1000); 398 $(images[nextImage]).fadeIn(1000); 399 currentImage = nextImage; 400 } 401 402 if (imageCount > 1) { 403 setInterval(cycleImages, interval); 404 } 405 } 406 407 $('.arrow-home-down').click(function () { 408 $('html, body').animate({ scrollTop: $('.headline.slider-line').offset().top - 60 }, 800, 'swing'); 409 }); 410 411 if (window.LogogenieCompanyNameForm) {
412 window.LogogenieCompanyNameForm.init(); 413 } 414 415 $('.js-inline-video').on('click', function () { 416 var $wrapper = $(this); 417 var $iframe = $wrapper.find('.video-iframe'); 418 if (!$iframe.attr('src')) { 419 $iframe.attr('src', $wrapper.data('embed-src')); 420 } 421 $wrapper.addClass('is-playing'); 422 }); 423 424 $('.fancybox-media').click(function () { 425 var width = 700; 426 var height = 445; 427 428 if ($(window).width() < 768) { 429 width = '100%'; 430 height = 260; 431 } 432 433 $.fancybox({ 434 padding: 10, 435 autoScale: false, 436 showCloseButton: false, 437 transitionIn: 'none', 438 transitionOut: 'none', 439 title: '', 440 width: width, 441 height: height, 442 overlayColor: '#000', 443 overlayOpacity: 0.5, 444 href: this.href.replace(new RegExp('watch\\?v=', 'i'), 'v/'), 445 type: 'swf', 446 swf: { 447 wmode: 'transparent', 448 allowfullscreen: 'true' 449 } 450 }); 451 452 return false; 453 }); 454 455 $('.slider').slick({ 456 dots: true, 457 infinite: true, 458 speed: 500, 459 slidesToShow: 4, 460 arrows: false, 461 slidesToScroll: 1, 462 autoplaySpeed: 5000, 463 autoplay: true, 464 responsive: [ 465 { 466 dots: true, 467 breakpoint: 1201, 468 arrows: false, 469 settings: { 470 slidesToShow: 3, 471 slidesToScroll: 1 472 } 473 }, 474 { 475 breakpoint: 1000, 476 arrows: false, 477 dots: true, 478 settings: { 479 slidesToShow: 2, 480 slidesToScroll: 1 481 } 482 }, 483 { 484 breakpoint: 620, 485 dots: true, 486 arrows: false, 487 settings: { 488 slidesToShow: 1, 489 slidesToScroll: 1 490 } 491 } 492 ] 493 }); 494 }); 495 496 function initHomeTestimonials() { 497 var configNode = document.getElementById('home-testimonials-config'); 498 var wrapper = document.querySelector('.js-home-testimonials'); 499 var leftSlot = document.querySelector('.js-home-testimonial-slot-left'); 500 var rightSlot = document.querySelector('.js-home-testimonial-slot-right'); 501 var dots = Array.prototype.slice.call(document.querySelectorAll('.js-home-testimonial-dot')); 502 if (!configNode || !wrapper || !leftSlot || !rightSlot || dots.length === 0) { 503 return; 504 } 505 506 var config; 507 try { 508 config = JSON.parse(configNode.textContent || '{}'); 509 } catch (error) { 510 return; 511 } 512 513 var testimonials = config.testimonials || []; 514 var quoteSvg = config.quoteSvg || ''; 515 var starsSvg = config.starsSvg || ''; 516 var pageCount = testimonials.length; 517 if (pageCount === 0) { 518 return; 519 } 520 521 var currentPage = 0; 522 var timerId = null; 523 var isAnimating = false; 524 var animationTarget = null; 525 526 function escapeHtml(value) { 527 return String(value || '') 528 .replace(/&/g, '&') 529 .replace(/</g, '<') 530 .replace(/>/g, '>') 531 .replace(/"/g, '"') 532 .replace(/'/g, '''); 533 } 534 535 function buildCardHtml(item) { 536 return '' + 537 '<div class="testimonial-card">' + 538 '<div class="quote-icon">' + quoteSvg + '</div>' + 539 '<h3 class="testimonial-title">"' + escapeHtml(item.title) + '"</h3>' + 540 '<p class="testimonial-content">' + escapeHtml(item.text) + '</p>' + 541 '<div class="customer-info">' + 542 '<h4 class="customer-name">' + escapeHtml(item.name) + '</h4>' + 543 '</div>' + 544 '<div class="star-rating">' + starsSvg + '</div>' + 545 '</div>'; 546 } 547 548 function setDotState(pageIndex) {
549 dots.forEach(function (dot, index) { 550 dot.classList.toggle('active', index === pageIndex); 551 }); 552 } 553 554 function isMobile() { 555 return window.matchMedia('(max-width: 768px)').matches; 556 } 557 558 function normalizeIndex(index) { 559 return ((index % pageCount) + pageCount) % pageCount; 560 } 561 562 function getStepDirection(from, to) { 563 from = normalizeIndex(from); 564 to = normalizeIndex(to); 565 if (from === to) { 566 return 0; 567 } 568 return to > from ? 1 : -1; 569 } 570 571 function countSteps(from, to) { 572 from = normalizeIndex(from); 573 to = normalizeIndex(to); 574 if (from === to) { 575 return 0; 576 } 577 return Math.abs(to - from); 578 } 579 580 function renderPair(startIndex) { 581 currentPage = normalizeIndex(startIndex); 582 var leftIndex = currentPage; 583 var rightIndex = (leftIndex + 1) % pageCount; 584 leftSlot.innerHTML = buildCardHtml(testimonials[leftIndex]); 585 leftSlot.style.visibility = ''; 586 if (pageCount > 1 && !isMobile()) { 587 rightSlot.style.display = ''; 588 rightSlot.innerHTML = buildCardHtml(testimonials[rightIndex]); 589 rightSlot.style.visibility = ''; 590 } else if (isMobile()) { 591 rightSlot.style.display = 'none'; 592 rightSlot.innerHTML = ''; 593 } else { 594 rightSlot.style.display = 'none'; 595 rightSlot.innerHTML = ''; 596 } 597 setDotState(leftIndex); 598 } 599 600 function measureStepPx() { 601 var leftRect = leftSlot.getBoundingClientRect(); 602 if (!isMobile() && rightSlot.style.display !== 'none') { 603 var rightRect = rightSlot.getBoundingClientRect(); 604 return Math.abs(leftRect.left - rightRect.left); 605 } 606 return leftRect.width; 607 } 608 609 function buildStripIndices(from, to, direction, steps) { 610 var indices = []; 611 var i; 612 613 if (direction > 0) { 614 for (i = 0; i <= steps; i++) { 615 indices.push(normalizeIndex(from + i)); 616 } 617 if (!isMobile()) { 618 indices.push(normalizeIndex(from + steps + 1)); 619 } 620 } else { 621 for (i = 0; i <= steps; i++) { 622 indices.push(normalizeIndex(to + i)); 623 } 624 if (!isMobile()) { 625 indices.push(normalizeIndex(to + steps + 1)); 626 } 627 } 628 629 return indices; 630 } 631 632 function clearActiveTrack() { 633 var activeTrack = wrapper.querySelector('.js-home-testimonials-track'); 634 if (activeTrack && activeTrack.parentNode) { 635 activeTrack.parentNode.removeChild(activeTrack); 636 } 637 } 638 639 function getAnimationDuration(steps, pace) { 640 if (pace === 'auto') { 641 return 0.6 * steps; 642 } 643 return Math.min(1.5, 0.28 * steps + 0.2); 644 } 645 646 function animateTo(targetIndex, options) { 647 options = options || {}; 648 var pace = options.pace === 'auto' ? 'auto' : 'click'; 649 targetIndex = normalizeIndex(targetIndex); 650 if (targetIndex === currentPage && !isAnimating) { 651 return; 652 } 653 654 var from = currentPage; 655 var direction; 656 var steps; 657 658 if (pace === 'auto') { 659 direction = 1; 660 steps = 1; 661 } else { 662 direction = getStepDirection(from, targetIndex); 663 steps = countSteps(from, targetIndex); 664 } 665 666 if (steps === 0) { 667 return; 668 } 669 670 if (isAnimating) { 671 clearActiveTrack(); 672 } 673 674 isAnimating = true; 675 animationTarget = targetIndex; 676 setDotState(targetIndex); 677 678 var stepPx = measureStepPx(); 679 var trackGap = isMobile() ? 0 : 40; 680 var indices = buildStripIndices(from, targetIndex, direction, steps); 681 var wrapperRect = wrapper.getBoundingClientRect(); 682 var leftRect = leftSlot.getBoundingClientRect(); 683 var slotWidth = leftRect.width; 684 var duration = getAnimationDuration(steps, pace); 685 686 leftSlot.style.visibility = 'hidden'; 687 if (!isMobile()) { 688 rightSlot.style.visibility = 'hidden'; 689 } 690 691 clearActiveTrack(); 692 693 var track = document.createElement('div'); 694 track.className = 'js-home-testimonials-track'; 695 track.style.display = 'flex'; 696 track.style.gap = trackGap + 'px'; 697 track.style.position = 'absolute'; 698 track.style.top = (leftRect.top - wrapperRect.top) + 'px'; 699 track.style.left = (leftRect.left - wrapperRect.left) + 'px'; 700 track.style.zIndex = '2'; 701 track.style.willChange = 'transform'; 702 track.style.transition = 'transform ' + duration + 's ease'; 703
704 indices.forEach(function (idx) { 705 var slot = document.createElement('div'); 706 slot.className = 'js-home-testimonial-slot'; 707 slot.style.flex = '0 0 ' + slotWidth + 'px'; 708 slot.style.width = slotWidth + 'px'; 709 slot.style.maxWidth = slotWidth + 'px'; 710 slot.innerHTML = buildCardHtml(testimonials[idx]); 711 track.appendChild(slot); 712 }); 713 714 var initialTranslate; 715 var finalTranslate; 716 717 if (direction > 0) { 718 initialTranslate = 0; 719 finalTranslate = -(steps * stepPx); 720 } else { 721 var fromPos = indices.indexOf(from); 722 if (fromPos < 0) { 723 fromPos = steps; 724 } 725 initialTranslate = -(fromPos * stepPx); 726 finalTranslate = 0; 727 } 728 729 track.style.transform = 'translateX(' + initialTranslate + 'px)'; 730 wrapper.appendChild(track); 731 732 requestAnimationFrame(function () { 733 requestAnimationFrame(function () { 734 track.style.transform = 'translateX(' + finalTranslate + 'px)'; 735 }); 736 }); 737 738 setTimeout(function () { 739 clearActiveTrack(); 740 renderPair(targetIndex); 741 isAnimating = false; 742 animationTarget = null; 743 }, Math.round(duration * 1000) + 80); 744 } 745 746 function goNextPage() { 747 animateTo(normalizeIndex(currentPage + 1), { pace: 'auto' }); 748 } 749 750 function startAutoRotate() { 751 if (timerId) { 752 clearInterval(timerId); 753 } 754 if (pageCount < 2) { 755 return; 756 } 757 timerId = setInterval(goNextPage, 8000); 758 } 759 760 dots.forEach(function (dot) { 761 dot.addEventListener('click', function () { 762 var page = parseInt(dot.getAttribute('data-page'), 10); 763 if (isNaN(page) || (page === currentPage && !isAnimating)) { 764 return; 765 } 766 animateTo(page, { pace: 'click' }); 767 startAutoRotate(); 768 }); 769 }); 770 771 window.addEventListener('resize', function () { 772 if (isAnimating) { 773 return; 774 } 775 renderPair(currentPage); 776 }); 777 778 renderPair(0); 779 startAutoRotate(); 780 } 781 782 function initHomeIndustrySearchPlaceholder() { 783 var input = document.querySelector('.js-home-industry-search-input'); 784 if (!input) { 785 return; 786 } 787 788 var desktopPlaceholder = input.getAttribute('data-placeholder-desktop') || ''; 789 var mobilePlaceholder = input.getAttribute('data-placeholder-mobile') || ''; 790 var mobileQuery = window.matchMedia('(max-width: 768px)'); 791 792 function syncPlaceholder() { 793 if (document.activeElement === input) { 794 return; 795 } 796 797 input.setAttribute('placeholder', mobileQuery.matches ? mobilePlaceholder : desktopPlaceholder); 798 } 799 800 syncPlaceholder(); 801 802 if (typeof mobileQuery.addEventListener === 'function') { 803 mobileQuery.addEventListener('change', syncPlaceholder); 804 } else if (typeof mobileQuery.addListener === 'function') { 805 mobileQuery.addListener(syncPlaceholder); 806 } 807 808 input.addEventListener('blur', syncPlaceholder); 809 } 810 811 document.addEventListener('DOMContentLoaded', function () { 812 initHomeHeroScrollPosition(); 813 initHomeSectionOrder(); 814 initScrollAnimations(); 815 initHomeHashScroll(); 816 initHomeTestimonials(); 817 initHomeIndustrySearchPlaceholder(); 818 if (typeof jQuery !== 'undefined' && window.LogogenieHeroCarousel) { 819 jQuery(function ($) { 820 window.LogogenieHeroCarousel.initAll($); 821 }); 822 } 823 }); 824 825 document.querySelectorAll('.home-faq-accordion-section .home-faq-accordion-header').forEach(function (header) { 826 header.addEventListener('click', function () { 827 var item = header.parentElement; 828 var isOpen = item.classList.contains('active'); 829 830 document.querySelectorAll('.home-faq-accordion-section .home-faq-accordion-item').forEach(function (otherItem) { 831 otherItem.classList.remove('active'); 832 var otherHeader = otherItem.querySelector('.home-faq-accordion-header'); 833 if (otherHeader) { 834 otherHeader.setAttribute('aria-expanded', 'false'); 835 } 836 }); 837 838 if (!isOpen) { 839 item.classList.add('active'); 840 header.setAttribute('aria-expanded', 'true'); 841 } 842 }); 843 }); 844})();
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.