1(function($){ 2 if(!$){ 3 return; 4 } 5const quickViewButtons2 = document.querySelectorAll('[data-quick-view2]'); 6const closeButtons2 = document.querySelectorAll('[data-close2]'); 7const fullwidthCards2 = document.querySelectorAll('.fullwidth2'); 8const isTouchDevice = 'ontouchstart' in document.documentElement; 9let toggle2; 10let toggleParent2; 11let fullwidth2; 12 13const openQuickView2 = (toggle2, toggleParent2, fullwidth2) => { 14 toggle2.setAttribute('aria-expanded', 'true'); 15 toggleParent2.classList.toggle('is-selected'); 16 fullwidth2.classList.toggle('is-hidden'); 17 fullwidth2.setAttribute('tabIndex', '0'); 18 //toggle2.scrollIntoView({ behavior: "smooth", block: "strat", inline: "start", offset:80 }); 19 if(isTouchDevice){ 20 setTimeout(() => { 21 jQuery('body, html').animate({ 22 scrollTop: jQuery(toggle2).offset().top - 60 23 }, 500) 24 }, 400); 25 } 26}; 27const closeQuickView2 = (toggle2, toggleParent2, fullwidth2) => { 28 toggle2.setAttribute('aria-expanded', 'false'); 29 toggleParent2.classList.toggle('is-selected'); 30 fullwidth2.classList.toggle('is-hidden'); 31 fullwidth2.removeAttribute('tabIndex'); 32}; 33 34quickViewButtons2.forEach(quickView2 => { 35 36 fullwidth2 = quickView2.parentElement.querySelector('.fullwidth2'); 37 quickView2.setAttribute('aria-expanded', 'false'); 38 quickView2.setAttribute('aria-controls', fullwidth2.id); 39 40 41 42 43 if(isTouchDevice){ 44 quickView2.addEventListener('click', (e) => { 45 toggle2 = quickView2; 46 toggleParent2 = toggle2.parentElement; 47 48 fullwidth2 = quickView2.parentElement.querySelector('.fullwidth2'); 49 50 51 if (toggle2.getAttribute('aria-expanded') === 'false') { 52 53 fullwidthCards2.forEach(fullwidthOpen2 => { 54 if (!fullwidthOpen2.classList.contains('is-hidden')) { 55 toggleParentOpen2 =fullwidthOpen2.parentElement; 56 toggleOpen2 = toggleParentOpen2.querySelector('[data-quick-view2]'); 57 58 closeQuickView2(toggleOpen2, toggleParentOpen2, fullwidthOpen2); 59 } 60 }); 61 62 openQuickView2(toggle2, toggleParent2, fullwidth2); 63 } else { 64 closeQuickView2(toggle2, toggleParent2, fullwidth2); 65 } 66 }); 67 }else{ 68 quickView2.addEventListener('click', (e) => { 69 toggle2 = quickView2; 70 toggleParent2 = toggle2.parentElement; 71 72 fullwidth2 = quickView2.parentElement.querySelector('.fullwidth2'); 73 74 75 if (toggle2.getAttribute('aria-expanded') === 'false') { 76 77 fullwidthCards2.forEach(fullwidthOpen2 => { 78 if (!fullwidthOpen2.classList.contains('is-hidden')) { 79 toggleParentOpen2 =fullwidthOpen2.parentElement; 80 toggleOpen2 = toggleParentOpen2.querySelector('[data-quick-view2]'); 81 82 closeQuickView2(toggleOpen2, toggleParentOpen2, fullwidthOpen2); 83 } 84 }); 85 86 openQuickView2(toggle2, toggleParent2, fullwidth2); 87 } else { 88 // closeQuickView2(toggle2, toggleParent2, fullwidth2); 89 } 90 }); 91 } 92}); 93 94closeButtons2.forEach(close2 => { 95 close2.addEventListener('click', (e) => { 96 fullwidth2 = e.target.parentElement; 97 toggleParent2 = fullwidth2.parentElement; 98 toggle2 = toggleParent2.querySelector('[data-quick-view2]');; 99 closeQuickView2(toggle2, toggleParent2, fullwidth2); 100 toggle2.focus(); 101 }); 102}); 103 })(window.jQuery);
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.